I can readily believe that many folk would expect them to be persistent. On the other hand, those of us who were steeped in VMS long before we came to Perl might expect the contrary. The only conclusion I wish to draw is that whatever is chosen will go against someone's expectations, and therefore, will need to be documented quite explicitly. / Tom Edelson -----Original Message----- From: Jarkko Hietaniemi [mailto:jhi@iki.fi] Sent: Saturday, October 27, 2001 11:08 PM To: Charles Lane Cc: craigberry@mac.com; vmsperl@perl.org; perl5-porters@perl.org Subject: Re: [PATCH perl@12696] C RTL awareness update for VMS > 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 CohenThread Previous | Thread Next