deprecated has asked for the wisdom of the Perl Monks concerning the following question:

In linux I find that I can do this:

$SIG{INT} = ⪚ # exit gracefully $SIG{TERM} = ⪚ # in the event we get killed $SIG{SEGV} = ⪚ # ... or worse! $SIG{CHLD} = ⪚ # because we're using system calls

But I find on my OpenBSD machine that it just runs and quits, no error messages or anything. Is this another stupid mistake on my part, or is there a difference between BSD's signals and GNU's signals?

thanks,
brother dep.

Replies are listed 'Best First'.
Re: Signals in OpenBSD
by merlyn (Sage) on Mar 18, 2001 at 09:26 UTC
    Do you really have:
    $SIG{INT} = ⪚
    as you've written in there? If so, you are running eg when you are setting up the assignment. Perhaps you mean either of:
    $SIG{INT} = \⪚
    or
    $SIG{INT} = '&eg';
    Both of which delay the invocation until it's needed.
      Yeah, merlyn, goofed when I wrote that here.

      I wanted to update for everyone. jcwren provided me with this very useful node covering signals in a few operating systems (solaris and FreeBSD). I also dug up this node by tilly which describes the brokenness of signals in perl.

      In this case I decided to not worry about signals (since this is a BSD-only program, I dont need to worry about signals on linux, which work).

      You can read perldoc perlipc for more information.

      brother dep.

      --
      transcending "coolness" is what makes us cool.