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 } }