diff options
author | Simo Sorce <idra@samba.org> | 2010-06-15 18:38:44 -0400 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-03-29 16:03:50 +0200 |
commit | 2d333ae8bc42a5aab7df6985b1432e3a480e74dc (patch) | |
tree | a5f7ab7655ba52773a597f4bbcbf74be58516cac /source3/printing | |
parent | 99941eb92b2fa5b6c80649abc36b159802241088 (diff) | |
download | samba-2d333ae8bc42a5aab7df6985b1432e3a480e74dc.tar.gz samba-2d333ae8bc42a5aab7df6985b1432e3a480e74dc.tar.bz2 samba-2d333ae8bc42a5aab7df6985b1432e3a480e74dc.zip |
s3:spoolssd Create our own log file
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/spoolssd.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/printing/spoolssd.c b/source3/printing/spoolssd.c index 00f360f531..b501a33755 100644 --- a/source3/printing/spoolssd.c +++ b/source3/printing/spoolssd.c @@ -23,6 +23,20 @@ #define SPOOLSS_PIPE_NAME "spoolss" + +static void spoolss_reopen_logs(void) +{ + char *lfile = NULL; + int ret; + + ret = asprintf(&lfile, "%s.spoolssd", lp_logfile()); + if (ret > 0) { + lp_set_logfile(lfile); + SAFE_FREE(lfile); + } + reopen_logs(); +} + void start_spoolssd(void) { pid_t pid; @@ -45,6 +59,8 @@ void start_spoolssd(void) } /* child */ + close_low_fds(false); + status = reinit_after_fork(server_messaging_context(), server_event_context(), procid_self(), true); @@ -53,6 +69,8 @@ void start_spoolssd(void) smb_panic("reinit_after_fork() failed"); } + spoolss_reopen_logs(); + smbd_setup_sig_term_handler(); smbd_setup_sig_hup_handler(); |