From: janw Date: Mon, 14 Jan 2008 13:54:44 +0000 (+0000) Subject: Added mappings for STDERR and STDOUT. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cdba36bf283d0e811f7efabbcb7fa62360b4128f;p=gosa.git Added mappings for STDERR and STDOUT. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8326 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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 /: $!";