summaryrefslogtreecommitdiff
path: root/source3/printing/printing.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-21 23:24:18 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-27 15:28:07 +0100
commitac61f650ae640c13beee9d48304d7939f700aa11 (patch)
treeb512f8c4cdd63260bbbb1ee2d50807b98d99cab1 /source3/printing/printing.c
parent27f812f3a85ce21ca79143f59c823913f57fa507 (diff)
downloadsamba-ac61f650ae640c13beee9d48304d7939f700aa11.tar.gz
samba-ac61f650ae640c13beee9d48304d7939f700aa11.tar.bz2
samba-ac61f650ae640c13beee9d48304d7939f700aa11.zip
s3:smbd: use signal events for SIGTERM, SIGHUP and SIGCHLD
metze
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r--source3/printing/printing.c18
1 files changed, 3 insertions, 15 deletions
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;
}