diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-05-10 11:49:55 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-05-10 11:49:55 +0000 |
commit | e86cba2194a04a581b872076d408c66c28b16760 (patch) | |
tree | c677a493cdcaf1cd7c313208489d319545f4f8fe | |
parent | e48b4ec4c5849992b04ed5d293d524779cb7a43a (diff) | |
download | samba-e86cba2194a04a581b872076d408c66c28b16760.tar.gz samba-e86cba2194a04a581b872076d408c66c28b16760.tar.bz2 samba-e86cba2194a04a581b872076d408c66c28b16760.zip |
check for sighup on each packet - otherwise it can take a _long_ time
to reload services
(This used to be commit 0fb4ba4e037f25b8b75bcae0ecb1d9b43f0f9e5f)
-rw-r--r-- | source3/smbd/process.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index ac81116999..3d2a507cca 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1012,6 +1012,18 @@ void smbd_process(void) /* free up temporary memory */ lp_talloc_free(); + /* + * If reload_after_sighup == True then we got a SIGHUP + * and are being asked to reload. Fix from <branko.cibej@hermes.si> + */ + if (reload_after_sighup) { + /* become root */ + unbecome_user(); + DEBUG(1,("Reloading services after SIGHUP\n")); + reload_services(False); + reload_after_sighup = False; + } + while(!receive_message_or_smb(InBuffer,BUFFER_SIZE,select_timeout,&got_smb)) { if(!timeout_processing( deadtime, &select_timeout, &last_timeout_processing_time)) |