Fix bug: Parent process exits but child process didn't
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>main^2
parent
db85c135cb
commit
8c2e9c3a57
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue