From: Adam Dickmeiss Date: Mon, 13 Jan 2003 14:32:06 +0000 (+0000) Subject: Call bend_stop only for main process (not from forked child) X-Git-Tag: YAZ.1.9.2.Roel~4 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=9b92a8975685e36dd4c199a508cabf01de6ebef0 Call bend_stop only for main process (not from forked child) --- diff --git a/server/statserv.c b/server/statserv.c index 5922a2b..d831e50 100644 --- a/server/statserv.c +++ b/server/statserv.c @@ -6,7 +6,7 @@ * NT threaded server code by * Chas Woodfield, Fretwell Downing Informatics. * - * $Id: statserv.c,v 1.88 2003-01-06 08:20:28 adam Exp $ + * $Id: statserv.c,v 1.89 2003-01-13 14:32:06 adam Exp $ */ #include @@ -354,7 +354,6 @@ void statserv_closedown() { IOCHAN p; -/* CHANGE */ if (control_block.bend_stop) (*control_block.bend_stop)(&control_block); for (p = pListener; p; p = p->next) @@ -416,6 +415,10 @@ static void listener(IOCHAN h, int event) } sprintf(nbuf, "%s(%d)", me, getpid()); yaz_log_init(control_block.loglevel, nbuf, 0); + /* ensure that bend_stop is not called when each child exits - + only for the main process .. + */ + control_block.bend_stop = 0; } else /* parent */ {