summaryrefslogtreecommitdiffstats
path: root/extensions/Push/lib/Daemon.pm
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-01-27 05:27:50 +0100
committerByron Jones <glob@mozilla.com>2015-01-27 05:27:50 +0100
commit90244813fe8110fc91f3746ebd93880e1c911cf1 (patch)
tree34ff732e860855956f043d0a41db8b2f30ef0095 /extensions/Push/lib/Daemon.pm
parenta748745d3eb9110b0c6bcd803d8d86db8951ad43 (diff)
downloadbugzilla-90244813fe8110fc91f3746ebd93880e1c911cf1.tar.gz
bugzilla-90244813fe8110fc91f3746ebd93880e1c911cf1.tar.xz
Bug 1124432: Backport upstream bug 1079065 to bmo/4.2 to fix improper use of open() calls
Diffstat (limited to 'extensions/Push/lib/Daemon.pm')
-rw-r--r--extensions/Push/lib/Daemon.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions/Push/lib/Daemon.pm b/extensions/Push/lib/Daemon.pm
index 66e15783e..c8472e450 100644
--- a/extensions/Push/lib/Daemon.pm
+++ b/extensions/Push/lib/Daemon.pm
@@ -69,12 +69,12 @@ sub gd_redirect_output {
my $self = shift;
my $filename = bz_locations()->{datadir} . '/' . $self->{gd_progname} . ".log";
- open(STDERR, ">>$filename") or (print "could not open stderr: $!" && exit(1));
+ open(STDERR, ">>", $filename) or (print "could not open stderr: $!" && exit(1));
close(STDOUT);
- open(STDOUT, ">&STDERR") or die "redirect STDOUT -> STDERR: $!";
+ open(STDOUT, ">&", STDERR) or die "redirect STDOUT -> STDERR: $!";
$SIG{HUP} = sub {
close(STDERR);
- open(STDERR, ">>$filename") or (print "could not open stderr: $!" && exit(1));
+ open(STDERR, ">>", $filename) or (print "could not open stderr: $!" && exit(1));
};
}