r37: CRITICAL BUGFIX: after forking, reset child_arraysize to zero to make
authoryoe <yoe>
Mon, 29 Sep 2003 17:57:44 +0000 (17:57 +0000)
committeryoe <yoe>
Mon, 29 Sep 2003 17:57:44 +0000 (17:57 +0000)
sure nbd-server doesn't go berserk and start sending SIGTERM to all
processes instead of just its own clients, when killed.

configure.in
nbd-server.c

index 5e4fc24..86d7ac9 100644 (file)
@@ -1,6 +1,6 @@
 dnl Configure script for NBD system
 dnl (c) 1998 Martin Mares <mj@ucw.cz>, (c) 2000 Pavel Machek <pavel@ucw.cz>
-AC_INIT(nbd, 2.4, wouter@debian.org)
+AC_INIT(nbd, 2.5, wouter@debian.org)
 
 AC_PROG_CC
 AC_MSG_CHECKING(whether warnings should be enabled)
index b94e2ba..f373d0e 100644 (file)
@@ -371,6 +371,7 @@ void connectme(int port)
                        close(net) ; continue ; }
                /* child */
                realloc(children,0);
+               child_arraysize=0;
                close(sock) ;
 #endif // NOFORK
                msg2(LOG_INFO,"Starting to serve") ;