From: cajus Date: Thu, 6 Mar 2008 15:56:35 +0000 (+0000) Subject: Updated stderr handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=651f27b4a03e89df0f9414568c9207bc9bf15430;p=gosa.git Updated stderr handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9402 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-bus b/gosa-si/gosa-si-bus index f1da0ba05..bc3a1c9bb 100755 --- a/gosa-si/gosa-si-bus +++ b/gosa-si/gosa-si-bus @@ -926,9 +926,9 @@ $SIG{CHLD} = 'IGNORE'; # forward error messages to logfile if ( ! $foreground ) { - open STDIN, '/dev/null' or die "Can’t read /dev/null: $!"; - open STDOUT, '>>/dev/null' or die "Can't write to /dev/null: $!"; - open STDERR, '>>/dev/null' or die "Can't write to /dev/null: $!"; + open( STDIN, '+>/dev/null' ); + open( STDOUT, '+>&STDIN' ); + open( STDERR, '+>&STDIN' ); } # Just fork, if we are not in foreground mode diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index 9f945819e..6e4fdc38d 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -1111,9 +1111,9 @@ GetOptions("h|help" => \&usage, # forward error messages to logfile if ( ! $foreground ) { - open STDIN, '/dev/null' or die "Can’t read /dev/null: $!"; - open STDOUT, '>>/dev/null' or die "Can't write to /dev/null: $!"; - open STDERR, '>>/dev/null' or die "Can't write to /dev/null: $!"; + open( STDIN, '+>/dev/null' ); + open( STDOUT, '+>&STDIN' ); + open( STDERR, '+>&STDIN' ); } # Just fork, if we are not in foreground mode diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 7c8fa0ee9..aed1a8fb5 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -1578,8 +1578,9 @@ $SIG{CHLD} = 'IGNORE'; # forward error messages to logfile if( ! $foreground ) { - open(STDERR, '>>', $log_file); - open(STDOUT, '>>', $log_file); + open( STDIN, '+>/dev/null' ); + open( STDOUT, '+>&STDIN' ); + open( STDERR, '+>&STDIN' ); } # Just fork, if we are not in foreground mode