summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2000-07-24 06:20:13 +0000
committerTim Potter <tpot@samba.org>2000-07-24 06:20:13 +0000
commit47f8f8e52227024f6b5889f7d12d7d0aa0a7104e (patch)
treed8b560e5117be54f081519d840c4ba7dddb8ca78 /source3/smbd
parentaffabf1909bd61c735ed38cf3f2ea1828c7c8de5 (diff)
downloadsamba-47f8f8e52227024f6b5889f7d12d7d0aa0a7104e.tar.gz
samba-47f8f8e52227024f6b5889f7d12d7d0aa0a7104e.tar.bz2
samba-47f8f8e52227024f6b5889f7d12d7d0aa0a7104e.zip
Run main server loop with sys_select() instead of sys_select_intr(). The
main daemon was not catching sighup and reloading the service file. (This used to be commit f026a897e9296a71fb5c4d5f6e1b4d3287689bde)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 854a61d385..8691603eb3 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -200,10 +200,21 @@ max can be %d\n",
memcpy((char *)&lfds, (char *)&listen_set,
sizeof(listen_set));
- num = sys_select_intr(FD_SETSIZE,&lfds,NULL);
+ num = sys_select(FD_SETSIZE,&lfds,NULL);
- if (num == -1 && errno == EINTR)
+ if (num == -1 && errno == EINTR) {
+ extern VOLATILE SIG_ATOMIC_T reload_after_sighup;
+
+ /* check for sighup processing */
+ if (reload_after_sighup) {
+ unbecome_user();
+ DEBUG(1,("Reloading services after SIGHUP\n"));
+ reload_services(False);
+ reload_after_sighup = False;
+ }
+
continue;
+ }
/* check if we need to reload services */
check_reload(time(NULL));