Move SIGUSR1 notification as late as possible.
If we inherited a signal mask from the parent process that ignores SIGUSR1, then we will send SIGUSR1 to the parent to indicate when we're ready to accept connections. Unfortunately, we send this notification way too early, right after creating the sockets rather than just before entering the main loop. Move it to just before Dispatch() so we're not lying quite so much.
This commit is contained in:
@@ -449,6 +449,8 @@ main(int argc, char *argv[], char *envp[])
|
||||
}
|
||||
}
|
||||
|
||||
NotifyParentProcess();
|
||||
|
||||
Dispatch();
|
||||
|
||||
/* Now free up whatever must be freed */
|
||||
|
||||
Reference in New Issue
Block a user