From a261e0df6fcd4cd7774ae9b37bbae777791fc2bb Mon Sep 17 00:00:00 2001 From: jsatoh Date: Sun, 25 May 2014 06:53:00 +0000 Subject: [PATCH] 2014-05-25 Junichi Satoh * lib/PandoraFMS/Tools.pm: Fixed STD* file open error. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10002 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 4 ++++ pandora_server/lib/PandoraFMS/Tools.pm | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 97cd5ac3c5..2e73ceea85 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,7 @@ +2014-05-25 Junichi Satoh + + * lib/PandoraFMS/Tools.pm: Fixed STD* file open error. + 2014-05-22 Ramon Novoa * lib/PandoraFMS/NetworkServer.pm, diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 35e344a626..f0b75b350e 100644 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -254,9 +254,9 @@ sub ascii_to_html($) { sub pandora_daemonize { my $pa_config = $_[0]; - open STDIN, '$DEVNULL' or die "Can't read $DEVNULL: $!"; - open STDOUT, '>>$DEVNULL' or die "Can't write to $DEVNULL: $!"; - open STDERR, '>>$DEVNULL' or die "Can't write to $DEVNULL: $!"; + open STDIN, "$DEVNULL" or die "Can't read $DEVNULL: $!"; + open STDOUT, ">>$DEVNULL" or die "Can't write to $DEVNULL: $!"; + open STDERR, ">>$DEVNULL" or die "Can't write to $DEVNULL: $!"; chdir '/tmp' or die "Can't chdir to /tmp: $!"; defined(my $pid = fork) or die "Can't fork: $!"; exit if $pid;