Run main server loop with sys_select() instead of sys_select_intr(). The
authorTim Potter <tpot@samba.org>
Mon, 24 Jul 2000 06:20:13 +0000 (06:20 +0000)
committerTim Potter <tpot@samba.org>
Mon, 24 Jul 2000 06:20:13 +0000 (06:20 +0000)
main daemon was not catching sighup and reloading the service file.

source/smbd/server.c

index 854a61d385b753ca868f19302b890ab702a3b573..8691603eb33f41c4f0106df5ba03cc750f8041f8 100644 (file)
@@ -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));