develooper Front page | perl.perl5.porters | Postings from October 2001

Re: [PATCH perl@12696] C RTL awareness update for VMS

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
October 27, 2001 20:07
Subject:
Re: [PATCH perl@12696] C RTL awareness update for VMS
Message ID:
20011028050737.D3640@alpha.hut.fi
> Now a question to the wider Perl community: is that what one should
> expect from %SIG?   Should SIG handlers be one-shot, or persistent?
> 
> I have the *suspicion* that it is expected that handlers are
> persistent, because otherwise the test code in HiRes:
> 
>     local $SIG{ALRM} = sub { $tick++ };
>     my $one = time; $tick = 0; ualarm(10_000); sleep until $tick;
>     my $two = time; $tick = 0; ualarm(10_000); sleep until $tick;
> 
> would clearly fail on the second ualarm.  Unfortunately the docs
> aren't very clear on this point.

I think modern signal behaviour says that signal handlers stay in
effect until cleared by sigaction() SA_RESETHAND or exec*().

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About