summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-04-28 07:30:28 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-04-28 07:30:28 +0000
commit9668e9c1702e533ce109822bee16adc8fdea3b17 (patch)
tree82547f3e0a8ea1201c0566d1c79402462eb7878c /ext
parent4694d0eaf09e23800ff4cc507408eb49b7fd0b3b (diff)
downloadperl-9668e9c1702e533ce109822bee16adc8fdea3b17.tar.gz
forked child may not exit correctly if it failed to open
/dev/console (from Graham Barr) p4raw-id: //depot/perl@5985
Diffstat (limited to 'ext')
-rw-r--r--ext/Sys/Syslog/Syslog.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/Sys/Syslog/Syslog.pm b/ext/Sys/Syslog/Syslog.pm
index d109a9d8a6..95f89ce4fc 100644
--- a/ext/Sys/Syslog/Syslog.pm
+++ b/ext/Sys/Syslog/Syslog.pm
@@ -244,9 +244,9 @@ sub syslog {
else {
if (open(CONS,">/dev/console")) {
print CONS "<$facility.$priority>$whoami: $message\r";
- exit if defined $pid; # if fork failed, we're parent
close CONS;
}
+ exit if defined $pid; # if fork failed, we're parent
}
}
}