Hang around until killed by init at shutdown

init does two rounds of killing at shutdown:
a round of SIGTERMs and a round of SIGKILLs.

We want to stay alive until the SIGKILL round
so we ignore the SIGTERM signal.
calculate-0.9.5
Ray Strode 15 years ago
parent 8124531ef1
commit 841068ba12

@ -1275,6 +1275,11 @@ main (int argc,
signal (SIGABRT, on_crash);
signal (SIGSEGV, on_crash);
/* If we're shutting down we don't want to die until killed
*/
if (state.mode == PLY_MODE_SHUTDOWN)
signal (SIGTERM, SIG_IGN);
/* before do anything we need to make sure we have a working
* environment.
*/

Loading…
Cancel
Save