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

Re: Does perl really need to use sigsetjmp? (18% performance hit)

Thread Previous | Thread Next
Nicholas Clark
January 9, 2001 04:13
Re: Does perl really need to use sigsetjmp? (18% performance hit)
Message ID:
On Tue, Jan 09, 2001 at 07:04:58AM -0500, Horsley Tom wrote:
> > >Hello, hello - any experts out there?  
> > 
> > Apparently not. I cannot at present think what sigsetjmp() gains 
> > us. Do you have an guidelines which say "use sigsetjmp() if 
> > your code does X?"
> I'm no expert, but:
> On most systems I know of, the guideline is what the name implies.
> If you want to longjmp out of a signal handler, you need to use the
> sig versions of the routines since there are signal frames and extra
> process state cleanups that have to happen.

and as you can install any perl subroutine as a signal handler, I'd infer
that any part of perl might actually be running in a signal handler.
[and might die back out to an eval that started before %SIG{} was touched,
so I don't even think the idea of switching to sigsetjump() when the first
%SIG{} assignment is made would work]

I don't think it's possible to win.

Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About