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:
Adam Jackson
2007-11-01 15:41:11 -04:00
parent a2ee5fe0c4
commit f01e149d1a
3 changed files with 53 additions and 38 deletions

View File

@@ -449,6 +449,8 @@ main(int argc, char *argv[], char *envp[])
}
}
NotifyParentProcess();
Dispatch();
/* Now free up whatever must be freed */