Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Spell out the signal name
Now it will say this:
«exit signal = SEGV (11)»
instead of just:
«exit signal = 11»
  • Loading branch information
AlexDaniel committed Jul 24, 2016
1 parent 6341f19 commit 73a6a1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion committable.pl
Expand Up @@ -26,6 +26,7 @@ package Committable;

use Cwd qw(cwd abs_path);
use Encode qw(decode_utf8);
use IPC::Signal 'sig_name';

use constant LIMIT => 300;

Expand Down Expand Up @@ -89,7 +90,10 @@ sub process_message {
($out, my $exit, my $signal, my $time) = $self->get_output($self->BUILDS . "/$full_commit/bin/perl6", $filename);
$out = decode_utf8($out);
$out .= " «exit code = $exit»" if ($exit != 0);
$out .= " «exit signal = $signal»" if ($signal != 0);
if ($signal != 0) {
my $signal_name = sig_name $signal;
$out .= " «exit signal = $signal_name ($signal";
}
}
my $short_commit = substr($commit, 0, 7);

Expand Down

0 comments on commit 73a6a1a

Please sign in to comment.