Fix bug: Parent process exits but child process didn't
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
1 parent
db85c135cb
commit
8c2e9c3a57
1 file changed
+3
@@ -32,6 +32,7 @@
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
#include <sys/sysinfo.h>
|
||||
#include <sys/prctl.h>
|
||||
|
||||
#include "uhttpd_internal.h"
|
||||
#include "connection.h"
|
||||
@@ -202,6 +203,8 @@ static void uh_start_worker(struct uh_server *srv, int n)
|
||||
uh_log_err("fork: %s\n", strerror(errno));
|
||||
return;
|
||||
case 0:
|
||||
prctl(PR_SET_PDEATHSIG, SIGKILL);
|
||||
|
||||
ev_loop_fork(srvi->loop);
|
||||
|
||||
if (srvi->reuseport) {
|
||||
|
||||
Reference in new issue
Block a user