From e959f2e2322cfac811946d418406267629a2c12b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 17 Sep 1998 06:36:08 +0000 Subject: fixed a potential problem with wins_write_database() child processes. In sig_term() we were calling wins_write_database(0) which would fork a child. This child might then get killed by the same process killing off the parent. That process would then fork another child etc. The solution is to pass a "background" flag to wins_write_database(0) and only fork if this is set. (This used to be commit 1e1a512e3ff59f962fb3de382f671618bed60839) --- source3/nmbd/nmbd_serverlistdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/nmbd/nmbd_serverlistdb.c') diff --git a/source3/nmbd/nmbd_serverlistdb.c b/source3/nmbd/nmbd_serverlistdb.c index a4dab6f419..458fbd0085 100644 --- a/source3/nmbd/nmbd_serverlistdb.c +++ b/source3/nmbd/nmbd_serverlistdb.c @@ -321,6 +321,8 @@ void write_browse_list(time_t t, BOOL force_write) return; } + lasttime = t; + dump_workgroups(force_write); for (subrec = FIRST_SUBNET; subrec ; subrec = NEXT_SUBNET_INCLUDING_UNICAST(subrec)) @@ -335,7 +337,6 @@ void write_browse_list(time_t t, BOOL force_write) if(!list_changed) return; - lasttime = t; updatecount++; pstrcpy(fname,lp_lockdir()); -- cgit