From cdba36bf283d0e811f7efabbcb7fa62360b4128f Mon Sep 17 00:00:00 2001 From: janw Date: Mon, 14 Jan 2008 13:54:44 +0000 Subject: [PATCH] Added mappings for STDERR and STDOUT. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8326 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-bus | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gosa-si/gosa-si-bus b/gosa-si/gosa-si-bus index 42f6cb70c..a5d50f1d2 100755 --- a/gosa-si/gosa-si-bus +++ b/gosa-si/gosa-si-bus @@ -1262,6 +1262,12 @@ if(-e $log_file ) { unlink $log_file } daemon_log(" ", 1); daemon_log("$0 started!", 1); +# forward error messages to logfile +if( ! $foreground ) { + open(STDERR, '>>', $log_file); + open(STDOUT, '>>', $log_file); +} + # Just fork, if we"re not in foreground mode if( ! $foreground ) { chdir '/' or die "Can't chdir to /: $!"; -- 2.30.2