On Tue, 5 Aug 2003 17:58:00 +0100 (BST), Mark <[EMAIL PROTECTED]> wrote:
> On Tue, 5 Aug 2003, Dominic Mitchell wrote:
>> I know older versions of Unix used to require you to reinstall your
>> signal handler when it was called.  Modern versions don't because this
>> leads to race conditions.
>>
>> I thought that perl papered over this idiosyncracy for you, but try
>> resetting the signal handler and see if it works:
> 
> Nope...perl 5.8 perlipc still states otherwise:
> 
>        Perl's signal mechanism is currently based on the
>        signal(3) function from the C library, you may sometimes
>        be so misfortunate as to run on systems where that
>        function is "broken", that is, it behaves in the old
>        unreliable SysV way rather than the newer, more reasonable
>        BSD and POSIX fashion.  So you'll see defensive people
>        writing signal handlers like this:
> 
>            sub REAPER {
>                $waitedpid = wait;
>                # loathe sysV: it makes us not only reinstate
>                # the handler, but place it after the wait
>                $SIG{CHLD} = \&REAPER;
>            }
>            $SIG{CHLD} = \&REAPER;
>            # now do something that forks...

Thank you!  I was looking at perlvar for %SIG and didn't spot that.

-Dom

-- 
| Semantico: creators of major online resources          |
|       URL: http://www.semantico.com/                   |
|       Tel: +44 (1273) 722222                           |
|   Address: 33 Bond St., Brighton, Sussex, BN1 1RD, UK. |

Reply via email to