//-------------------------------------------------------------------------------------------------- void exec_Init ( void ) //-------------------------------------------------------------------------------------------------- { le_sig_Block(SIGCHLD); le_sig_SetEventHandler(SIGCHLD, OnChildSignal); }
//-------------------------------------------------------------------------------------------------- static void StartDeferral ( void ) { le_updateCtrl_ConnectService(); // Setup the signal event handler before we do Defer. This way, even if we get signalled // before Defer gets done we won't deal with the signal until the next time round the // event loop - so our Defer and Allow count will match by the time we exit. le_sig_Block(SIGINT); le_sig_SetEventHandler(SIGINT, EndDeferral); le_sig_Block(SIGTERM); le_sig_SetEventHandler(SIGTERM, EndDeferral); le_updateCtrl_Defer(); // Our work is done here. Go wait on the event loop until someone SIGINTs or kills us. Done = true; }