Skip Menu |

This queue is for tickets about the Proc-Daemon CPAN distribution.

Report information
The Basics
Id: 19727
Status: resolved
Priority: 0/
Queue: Proc-Daemon

People
Owner: Nobody in particular
Requestors: DDICK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.03
Fixed in: 0.04



Subject: add EAGAIN support for failed fork
Currently, the Fork() routine will only retry failed forks if the EAGAIN error message matches /No more process/. This is not the case with linux at least. Adding the POSIX::EAGAIN check will improve portability for this module.
Subject: proc_daemon_eagain.patch
diff -Naur old/Daemon.pm new/Daemon.pm --- old/Daemon.pm 2003-06-20 08:53:09.000000000 +1000 +++ new/Daemon.pm 2006-06-06 19:10:01.000000000 +1000 @@ -43,7 +43,7 @@ FORK: { if (defined($pid = fork)) { return $pid; - } elsif ($! =~ /No more process/) { + } elsif (($! =~ /No more process/) || ($! == POSIX::EAGAIN())) { sleep 5; redo FORK; } else {
Thanks! Fixed in version 0.04