static void terminate(void) { DEBUG(0,("Got SIGTERM: going down...\n")); /* Write out wins.dat file if samba is a WINS server */ wins_write_database(0,False); /* Remove all SELF registered names from WINS */ release_wins_names(); /* Announce all server entries as 0 time-to-live, 0 type. */ announce_my_servers_removed(); /* If there was an async dns child - kill it. */ kill_async_dns_child(); exit(0); }
/**************************************************************************** ** catch a sigterm **************************************************************************** */ static void sig_term(int sig) { BlockSignals(True,SIGTERM); DEBUG(0,("Got SIGTERM: going down...\n")); /* Write out wins.dat file if samba is a WINS server */ wins_write_database(False); /* Remove all SELF registered names. */ release_my_names(); /* Announce all server entries as 0 time-to-live, 0 type. */ announce_my_servers_removed(); /* If there was an async dns child - kill it. */ kill_async_dns_child(); exit(0); } /* sig_term */
static void terminate(struct messaging_context *msg) { DEBUG(0,("Got SIGTERM: going down...\n")); /* Write out wins.dat file if samba is a WINS server */ wins_write_database(0,False); /* Remove all SELF registered names from WINS */ release_wins_names(); /* Announce all server entries as 0 time-to-live, 0 type. */ announce_my_servers_removed(); /* If there was an async dns child - kill it. */ kill_async_dns_child(); gencache_stabilize(); serverid_deregister(messaging_server_id(msg)); pidfile_unlink(); exit(0); }