From 4f4af2c062af0fe4f23c6a1bebba76738d27f76e Mon Sep 17 00:00:00 2001 From: yoe Date: Mon, 29 Sep 2003 17:57:44 +0000 Subject: [PATCH] r37: CRITICAL BUGFIX: after forking, reset child_arraysize to zero to make sure nbd-server doesn't go berserk and start sending SIGTERM to all processes instead of just its own clients, when killed. --- configure.in | 2 +- nbd-server.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 5e4fc24..86d7ac9 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl Configure script for NBD system dnl (c) 1998 Martin Mares , (c) 2000 Pavel Machek -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) diff --git a/nbd-server.c b/nbd-server.c index b94e2ba..f373d0e 100644 --- a/nbd-server.c +++ b/nbd-server.c @@ -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") ; -- 1.7.10.4