Re: Perl killed after child spawn

Do you have a question? Post it now! No Registration Necessary.  Now with pictures! wrote

: I'm finding that if my C++ child process bombs out with signal ABRT
: (this is on Solaris btw, with Perl v5.8.4), then Perl dies. The script
: run just says "Killed" and that's all I get out of it. [...]

How are you starting the child processes?

The bigger-hammer approach would be to ignore SIGABRT from the test
driver, at the disadvantage of losing meaning in exit statuses:

    $ cat try
    #! /usr/bin/perl

    use warnings;
    use strict;

    my @tests = (
      [ null  => "/bin/true" ],
      [ abort => 'perl -e \'kill ABRT, $$\'' ],

    foreach my $case (@tests) {
      my($desc,$cmd) = @$case;

      my $pid = fork;

      if ($pid) {
        waitpid $pid, 0;
        print "$desc: ", $? == 0 ? "PASS" : "FAIL", "\n";
      else {
        $SIG = "IGNORE";
        exec $cmd or die "$0: exec: $!";
    $ ./try
    null: PASS
    abort: PASS

You'll get better advice if you show us some code.

As long as Americans honor Lincoln so highly, there is probably no hope for
individual liberty in America. For, as Lincoln said as a young man, the man
who freed the slaves would be tempted to enslave free men.
    -- Wirkman Virkkala,

Site Timeline