summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c12
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;
}
}