Changeset 134 for branches/samba-3.0/source/nmbd/nmbd.c
- Timestamp:
- May 23, 2008, 6:56:41 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/nmbd/nmbd.c
r124 r134 158 158 static time_t lastt; 159 159 int n; 160 bool print_waiting_msg = true; 160 161 struct subnet_record *subrec; 161 162 … … 168 169 return; 169 170 } 171 172 try_again: 170 173 171 174 /* the list of probed interfaces has changed, we may need to add/remove 172 175 some subnets */ 173 176 load_interfaces(); 174 175 try_again:176 177 177 178 /* find any interfaces that need adding */ … … 234 235 /* We need to wait if there are no subnets... */ 235 236 if (FIRST_SUBNET == NULL) { 236 void (*saved_handler)(int); 237 238 DEBUG(0,("reload_interfaces: " 239 "No subnets to listen to. Waiting..\n")); 237 238 if (print_waiting_msg) { 239 DEBUG(0,("reload_interfaces: " 240 "No subnets to listen to. Waiting..\n")); 241 print_waiting_msg = false; 242 } 240 243 241 244 /* … … 244 247 */ 245 248 246 saved_handler = CatchSignal( SIGTERM, SIGNAL_CAST SIG_DFL);247 248 while (iface_count() == 0 ) {249 BlockSignals(false, SIGTERM); 250 251 while (iface_count() == 0 && !got_sig_term) { 249 252 sleep(5); 250 253 load_interfaces(); … … 252 255 253 256 /* 254 * We got an interface, restore our normal term handler. 255 */ 256 257 CatchSignal( SIGTERM, SIGNAL_CAST saved_handler ); 257 * Handle termination inband. 258 */ 259 260 if (got_sig_term) { 261 got_sig_term = 0; 262 terminate(); 263 } 264 265 /* 266 * We got an interface, go back to blocking term. 267 */ 268 269 BlockSignals(true, SIGTERM); 258 270 goto try_again; 259 271 }
Note:
See TracChangeset
for help on using the changeset viewer.