Skip Menu |

This queue is for tickets about the App-Control CPAN distribution.

Report information
The Basics
Id: 44589
Status: new
Priority: 0/
Queue: App-Control

People
Owner: Nobody in particular
Requestors: mg.pub [...] gmx.net
Cc:
AdminCc:

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



Subject: App::Control enters endless loop if started script dies on startup
Test case: let App::Control start a script that just exits on startup. App::Control enters the contol loop, and tries to determine if the process is running, which of course it is not. Whenever the LOOP count is reached, App::Control tries to kill the process, but only if it can send a signal to it, which it cannot, beause the process is dead already. Therefore App::Control also does not call exit() in the controlling process and stays in the (endless) loop. Suggestion: always call exit() if the LOOP count was reached, no matter if the child process is alive or not. Thanks for considering! This is the endless loop: while( not $self->running ) { warn $self->status if $self->{VERBOSE}; sleep( $self->{SLEEP} ); warn "is $self->{EXEC} ruinning (${loop}'th time)?\n" if $self->{VERBOSE} and $loop ; if ( defined $self->{LOOP} and $loop++ == $self->{LOOP} ) { warn "Failed to start $self->{EXEC}\n" if $self->{VERBOSE} ; if ( kill( 0, $child ) ) { warn "killing $child ...\n" if $self->{VERBOSE}; kill( 'KILL', $child ); exit; } } }