Skip Menu |
Report information
Id: 128805
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: slaven [at] rezic.de
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: run does not die on signals
Download (untitled) / with headers
text/plain 678b
If an external command called by run dies with an signal, then there's no exception: $ perl6 -e 'run "perl", "-e", q{kill SEGV => $$}; say "should not happen"' should not happen I would expect something similar to: $ perl6 -e 'run "perl", "-e", q{exit 1}; say "should not happen"' The spawned process exited unsuccessfully (exit code: 1) in block <unit> at -e line 1 except that the explanation should say something like (signal: SEGV) or (signal: segmentation fault), maybe with core dump information appended. Version info: perl6 --version This is Rakudo version 2016.07.1 built on MoarVM version 2016.07 implementing Perl 6.c. Operating system: Debian/jessie
On Mon Aug 01 13:52:57 2016, slaven@rezic.de wrote: Show quoted text
> If an external command called by run dies with an signal, then there's > no exception: > > $ perl6 -e 'run "perl", "-e", q{kill SEGV => $$}; say "should not > happen"' > should not happen > > I would expect something similar to: > > $ perl6 -e 'run "perl", "-e", q{exit 1}; say "should not happen"' > The spawned process exited unsuccessfully (exit code: 1) > in block <unit> at -e line 1 > > except that the explanation should say something like (signal: SEGV) > or (signal: segmentation fault), maybe with core dump information > appended. > > > Version info: > perl6 --version > This is Rakudo version 2016.07.1 built on MoarVM version 2016.07 > implementing Perl 6.c. > > Operating system: Debian/jessie
To clarify a bit: `run` doesn't throw exceptions. It returns a Proc object, which throws when it's sunk if the exit code is non-zero. In this case, the issue is the killed processes have 0 as their exit code: $ perl6 -e 'run("perl", "-e", q{kill SEGV => $$}).exitcode.say' 0


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org