mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-07 13:35:00 +00:00
Kill FS if -reincarnate parent dies unexpectedly
This only works on Linux.
This commit is contained in:
parent
9959096559
commit
1ab16bbd92
@ -44,6 +44,10 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#include <sys/prctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <switch_version.h>
|
#include <switch_version.h>
|
||||||
#include "private/switch_core_pvt.h"
|
#include "private/switch_core_pvt.h"
|
||||||
@ -397,6 +401,10 @@ static void reincarnate_protect(char **argv) {
|
|||||||
} else goto refork;
|
} else goto refork;
|
||||||
}
|
}
|
||||||
goto rewait;
|
goto rewait;
|
||||||
|
} else { /* child */
|
||||||
|
#ifdef __linux__
|
||||||
|
prctl(PR_SET_PDEATHSIG, SIGTERM);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user