try { Logger.log( "Going to terminate the daemon gracefully!!"); processCompound.sfTerminate(new TerminationRecord(
if (!processCompoundTerminated) { processCompoundTerminated = true; if (processCompound != null) { try { Logger.log( "Terminating sfDaemon gracefully!!"); processCompound.sfTerminate(new TerminationRecord(
    public static ProcessCompound deployProcessCompound()        throws Exception {        if (processCompound != null) {            return processCompound;        }        Signal.handle(new Signal("INT"), new SignalHandler () {            public void handle(Signal sig) {                try {                    Logger.log(                        "Going to terminate the daemon gracefully!!");                    processCompound.sfTerminate(new TerminationRecord(                                TerminationRecord.NORMAL,                                "sfDaemon forced to terminate ",                                 ((Prim)processCompound).sfCompleteName()));                }catch (RemoteException re) {                    Logger.log(re);                    //log and ignore                }            }        });        ComponentDescription descr = (ComponentDescription) getProcessCompoundDescription()                                                                .copy();        processCompound = (ProcessCompound) startComponent(deployComponent(                    descr));        return processCompound;    }