1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

nmbd handle shutdown message.

J.F.
(This used to be commit c33459f701)
This commit is contained in:
Jean-François Micouleau 2002-03-29 13:58:32 +00:00
parent e9f54e53cd
commit 3e0c6ded65

View File

@ -65,6 +65,15 @@ static void terminate(void)
exit(0);
}
/**************************************************************************** **
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 ) );