Check for fork/clone and re-initialize in close() -- for nginx

This commit is contained in:
Joseph Henry 2015-11-16 17:44:11 -08:00
commit f2289544b7
4 changed files with 2048 additions and 0 deletions

View file

@ -927,6 +927,7 @@ int poll(POLL_SIG)
// int fd
int close(CLOSE_SIG)
{
checkpid();
dwr(MSG_DEBUG,"close(%d)\n", fd);
if(fd == fdret_sock)
return 0; // FIXME: Ignore request to shut down our rpc fd, this is *almost always* safe