diff options
author | Jean-François Micouleau <jfm@samba.org> | 2002-03-29 13:58:32 +0000 |
---|---|---|
committer | Jean-François Micouleau <jfm@samba.org> | 2002-03-29 13:58:32 +0000 |
commit | 3e0c6ded6538899cbdf1f4c30669d411e07ac957 (patch) | |
tree | 2f8e7f68383beae6b2300f24040b0d04112322aa | |
parent | e9f54e53cdcd4eaf0b1aac0420c9349e5c2417d4 (diff) | |
download | samba-3e0c6ded6538899cbdf1f4c30669d411e07ac957.tar.gz samba-3e0c6ded6538899cbdf1f4c30669d411e07ac957.tar.bz2 samba-3e0c6ded6538899cbdf1f4c30669d411e07ac957.zip |
nmbd handle shutdown message.
J.F.
(This used to be commit c33459f7018a2522158b20261ab8c100fdde9034)
-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 ) ); |