提交 1ab16bbd authored 作者: Travis Cross's avatar Travis Cross

Kill FS if -reincarnate parent dies unexpectedly

This only works on Linux.
上级 99590965
...@@ -44,6 +44,10 @@ ...@@ -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) { ...@@ -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
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论