From ac61f650ae640c13beee9d48304d7939f700aa11 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 21 Jan 2009 23:24:18 +0100 Subject: s3:smbd: use signal events for SIGTERM, SIGHUP and SIGCHLD metze --- source3/printing/printing.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'source3/printing/printing.c') diff --git a/source3/printing/printing.c b/source3/printing/printing.c index bb29380007..0721713c01 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -22,8 +22,6 @@ #include "includes.h" #include "printing.h" -extern SIG_ATOMIC_T got_sig_term; -extern SIG_ATOMIC_T reload_after_sighup; extern struct current_user current_user; extern userdom_struct current_user_info; @@ -1427,6 +1425,9 @@ void start_background_queue(void) smb_panic("reinit_after_fork() failed"); } + smbd_setup_sig_term_handler(); + smbd_setup_sig_hup_handler(); + claim_connection( NULL, "smbd lpq backend", FLAG_MSG_GENERAL|FLAG_MSG_SMBD|FLAG_MSG_PRINT_GENERAL); @@ -1483,19 +1484,6 @@ void start_background_queue(void) exit_server_cleanly(NULL); } - /* check for some essential signals first */ - - if (got_sig_term) { - exit_server_cleanly(NULL); - } - - if (reload_after_sighup) { - change_to_root_user(); - DEBUG(1,("Reloading services after SIGHUP\n")); - reload_services(False); - reload_after_sighup = 0; - } - if (run_events(smbd_event_context(), ret, &r_fds, &w_fds)) { continue; } -- cgit