Skip Menu |

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

Report information
The Basics
Id: 75531
Status: new
Priority: 0/
Queue: Proc-Launcher

People
Owner: Nobody in particular
Requestors: mutant.nz [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.0.35
Fixed in: (no value)



Subject: Possible bug in cataching exceptions
I'm not sure if this is really a bug, but it can result in some odd (and potentially very bad) behaviour, so I'll leave it up to you to decide. In the start() method, the call to the component's start method is wrapped in an eval. If that component itself forks and its children throw an exception, it will be caught by that eval block. This will call the stopped() method, deleting the PID file. However the component's parent process could still be running. If start() is called again, the PID file won't exist, so a new instance of the component will be started up, meaning two are running (this is the very bad part). The workaround is to make sure a component catches all exceptions thrown by its children, however it seems like Proc::Launcher should handle this for us. Perhaps you could call is_running() after trapping an exception in that eval block, before calling stopped()?