]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
hfaxd: Release old accept fd
authorAidan Van Dyk <mountie@cherry.home.highrise.ca>
Thu, 3 Nov 2011 19:58:08 +0000 (15:58 -0400)
committerAidan Van Dyk <mountie@cherry.home.highrise.ca>
Thu, 3 Nov 2011 20:00:16 +0000 (16:00 -0400)
By unlinking from the dispatcher early, we prevented it from being
closed in the child, leaving an open listening fd on the main hfaxd
port.

If the main (parent) hfaxd exits, the child will inheret the listen
but won't actually include it in it's selects, or handle it.  It just
prevents a new master hfaxd from binding to it.

hfaxd/SuperServer.c++

index 983fdbc52cc484b9ff791c4b7f0cdba3b4e55a2e..9f0ef3046dec0c145b09b1f7fa04fdba052c5646 100644 (file)
@@ -90,7 +90,6 @@ SuperServer::inputReady(int fd)
         * with servers started via inetd).
         */
        HylaFAXServer* app; app = newChild();   // XXX for __GNUC__
-       Dispatcher::instance().unlink(fd);
        HylaFAXServer::closeLogging();          // close any open syslog fd
        HylaFAXServer::closeAllDispatched();
        Sys::close(STDERR_FILENO);