1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-07 19:15:40 -04:00

Add some help text for when it gets killed by a signal

This commit is contained in:
Ryan Voots 2016-10-15 08:35:28 -04:00
parent 66bc4ad0e9
commit 109c713dab
2 changed files with 6 additions and 1 deletions

4
.gitignore vendored
View file

@ -6,3 +6,7 @@ MYMETA.yml
Makefile
modules.lst
*.log
jail/dev/
jail/lib/
jail/usr/
jail/perl5/

View file

@ -40,7 +40,7 @@ sub spawn_eval {
}
warn "Spawning Eval: $args->{code}\n";
my $wheel = POE::Wheel::Run->new(
Program => [ $^X, $filename ],
Program => sub { system($^X, $filename); print "[Died $?]" if $? },
ProgramArgs => [ ],
CloseOnCall => 1, #Make sure all of the filehandles are closed.
@ -65,6 +65,7 @@ warn "Spawning Eval: $args->{code}\n";
$kernel->delay_set( timeout => 30, $wheel->ID );
}
sub timeout {
my( $self, $wheel_id ) = @_[OBJECT,ARG0];
warn "Got a timeout idea for $wheel_id";