diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nmbd/nmbd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 62e3f1757b..051991f46d 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -66,6 +66,15 @@ static void terminate(void) } /**************************************************************************** ** + Handle a SHUTDOWN message from smbcontrol. + **************************************************************************** */ + +static void nmbd_terminate(int msg_type, pid_t src, void *buf, size_t len) +{ + terminate(); +} + +/**************************************************************************** ** Catch a SIGTERM signal. **************************************************************************** */ @@ -857,6 +866,7 @@ static void usage(char *pname) message_init(); message_register(MSG_FORCE_ELECTION, nmbd_message_election); message_register(MSG_WINS_NEW_ENTRY, nmbd_wins_new_entry); + message_register(MSG_SHUTDOWN, nmbd_terminate); DEBUG( 3, ( "Opening sockets %d\n", global_nmb_port ) ); |