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 commit is contained in:
Jean-François Micouleau 0001-01-01 00:00:00 +00:00
parent b83f87d681
commit c33459f701

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 ) );