Subject: | Write to not existing command pipe |
Date: | Tue, 9 Sep 2008 13:34:40 +0200 |
To: | bug-POE-Component-Server-NSCA [...] rt.cpan.org |
From: | Andreas Fett <a.fett [...] gmx.de> |
Hi,
In
sub _message()
print { open my $fh, '>>', $nagios_cmd or die "$!\n"; $fh } $string, "\n";
will create a new regular file if $nagios_cmd fifo does not exists,
for example because Nagios is stopped. This will prevent Nagios
from starting again as it cannot create the command pipe.
Solution is to use
sysopen (my $fh , $nagios_cmd, POSIX::O_WRONLY)
which will fail if $nagios_cmd does not exists.
Andreas Fett
--
The three chief virtues of a programmer are:
Laziness, Impatience and Hubris. -- Larry Wall