From: Travis Cross Date: Fri, 26 Jul 2013 03:53:34 +0000 (+0000) Subject: Kill FS if -reincarnate parent dies unexpectedly X-Git-Tag: v1.4.1~19^2~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ab16bbd92b0634350ea5161e8071b4de7913b12;p=thirdparty%2Ffreeswitch.git Kill FS if -reincarnate parent dies unexpectedly This only works on Linux. --- diff --git a/src/switch.c b/src/switch.c index 2a68db473c..6ae8e584db 100644 --- a/src/switch.c +++ b/src/switch.c @@ -44,6 +44,10 @@ #endif #endif +#ifdef __linux__ +#include +#endif + #include #include #include "private/switch_core_pvt.h" @@ -397,6 +401,10 @@ static void reincarnate_protect(char **argv) { } else goto refork; } goto rewait; + } else { /* child */ +#ifdef __linux__ + prctl(PR_SET_PDEATHSIG, SIGTERM); +#endif } }