From 651f27b4a03e89df0f9414568c9207bc9bf15430 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 6 Mar 2008 15:56:35 +0000 Subject: [PATCH] Updated stderr handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9402 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-bus | 6 +++--- gosa-si/gosa-si-client | 6 +++--- gosa-si/gosa-si-server | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) 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 -- 2.30.2