diff options
author | Jeremy Allison <jra@samba.org> | 2002-03-14 02:15:08 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-03-14 02:15:08 +0000 |
commit | 840279f3424eb92d1c4b55e1f9a1aca938b087ca (patch) | |
tree | 35e6fa5ea11c55aacca70834748812a919962dfa /source3/smbd/process.c | |
parent | 57bd576445e42a55887c41d270f2230f5136b873 (diff) | |
download | samba-840279f3424eb92d1c4b55e1f9a1aca938b087ca.tar.gz samba-840279f3424eb92d1c4b55e1f9a1aca938b087ca.tar.bz2 samba-840279f3424eb92d1c4b55e1f9a1aca938b087ca.zip |
Now we have reliable signals take SIGTERM inband.
Jeremy.
(This used to be commit cad82926a8baf7605cef81f0e0d4daa8e527e6ee)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r-- | source3/smbd/process.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 8c037b4706..007621f6bb 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -43,6 +43,7 @@ extern int global_oplock_break; extern userdom_struct current_user_info; extern int smb_read_error; extern VOLATILE sig_atomic_t reload_after_sighup; +extern VOLATILE sig_atomic_t got_sig_term; extern BOOL global_machine_password_needs_changing; extern fstring global_myworkgroup; extern pstring global_myname; @@ -104,9 +105,10 @@ BOOL push_oplock_pending_smb_message(char *buf, int msg_len) } /**************************************************************************** -do all async processing in here. This includes UDB oplock messages, kernel -oplock messages, change notify events etc. + Do all async processing in here. This includes UDB oplock messages, kernel + oplock messages, change notify events etc. ****************************************************************************/ + static void async_processing(fd_set *fds, char *buffer, int buffer_len) { /* check for oplock messages (both UDP and kernel) */ @@ -114,6 +116,10 @@ static void async_processing(fd_set *fds, char *buffer, int buffer_len) process_local_message(buffer, buffer_len); } + if (got_sig_term) { + exit_server("Caught TERM signal"); + } + /* check for async change notify events */ process_pending_change_notify_queue(0); @@ -122,7 +128,7 @@ static void async_processing(fd_set *fds, char *buffer, int buffer_len) change_to_root_user(); DEBUG(1,("Reloading services after SIGHUP\n")); reload_services(False); - reload_after_sighup = False; + reload_after_sighup = 0; } } |