Changeset 232 for branches/samba-3.2.x/source/winbindd/winbindd.c
- Timestamp:
- May 27, 2009, 9:09:42 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.2.x/source/winbindd/winbindd.c
r228 r232 171 171 } 172 172 173 static bool do_sigterm;173 static SIG_ATOMIC_T do_sigterm = 0; 174 174 175 175 static void termination_handler(int signum) 176 176 { 177 do_sigterm = True;177 do_sigterm = 1; 178 178 sys_select_signal(signum); 179 179 } 180 180 181 static bool do_sigusr2;181 static SIG_ATOMIC_T do_sigusr2 = 0; 182 182 183 183 static void sigusr2_handler(int signum) 184 184 { 185 do_sigusr2 = True;185 do_sigusr2 = 1; 186 186 sys_select_signal(SIGUSR2); 187 187 } 188 188 189 static bool do_sighup;189 static SIG_ATOMIC_T do_sighup = 0; 190 190 191 191 static void sighup_handler(int signum) 192 192 { 193 do_sighup = True;193 do_sighup = 1; 194 194 sys_select_signal(SIGHUP); 195 195 } 196 196 197 static bool do_sigchld;197 static SIG_ATOMIC_T do_sigchld = 0; 198 198 199 199 static void sigchld_handler(int signum) 200 200 { 201 do_sigchld = True;201 do_sigchld = 1; 202 202 sys_select_signal(SIGCHLD); 203 203 } … … 222 222 DATA_BLOB *data) 223 223 { 224 do_sigterm = True;224 do_sigterm = 1; 225 225 } 226 226 … … 747 747 { 748 748 char c = 0; 749 int nwritten; 749 750 750 751 /* It's a dead client - hold a funeral */ … … 755 756 756 757 /* tell client, we are closing ... */ 757 write(state->sock, &c, sizeof(c)); 758 nwritten = write(state->sock, &c, sizeof(c)); 759 if (nwritten == -1) { 760 DEBUG(2, ("final write to client failed: %s\n", 761 strerror(errno))); 762 } 758 763 759 764 /* Close socket */ … … 823 828 reload_services_file(logfile); 824 829 825 do_sighup = False;830 do_sighup = 0; 826 831 } 827 832 } … … 998 1003 if (do_sigusr2) { 999 1004 print_winbindd_status(); 1000 do_sigusr2 = False;1005 do_sigusr2 = 0; 1001 1006 } 1002 1007 … … 1004 1009 pid_t pid; 1005 1010 1006 do_sigchld = False;1011 do_sigchld = 0; 1007 1012 1008 1013 while ((pid = sys_waitpid(-1, NULL, WNOHANG)) > 0) { … … 1218 1223 TimeInit(); 1219 1224 1220 if (!reinit_after_fork(winbind_messaging_context(), false)) { 1225 /* Don't use winbindd_reinit_after_fork here as 1226 * we're just starting up and haven't created any 1227 * winbindd-specific resources we must free yet. JRA. 1228 */ 1229 1230 if (!reinit_after_fork(winbind_messaging_context(), 1231 winbind_event_context(), false)) { 1221 1232 DEBUG(0,("reinit_after_fork() failed\n")); 1222 1233 exit(1);
Note:
See TracChangeset
for help on using the changeset viewer.