On Mon, 2004-01-12 at 05:46, Elizabeth Mattijsen wrote:
> At 10:09 +0000 1/12/04, Tim Bunce wrote:
> >On Sun, Jan 11, 2004 at 10:15:20PM -0500, Lincoln A. Baxter wrote:
> >  >    eval {
> >  >       local $SIG{ALRM} = sub { ... };
> >  >    }
> >Either way your Sys::SigAction is sufficient. The only thing it's
> >lacking that Sys::Signal has is the automatic restoration of the old
> >value when the object is destroyed. It would be trivial to add a
> >variant of sig_set_action() to do that for those that want it.
> >Something along the lines of:
> >
> >   sub sig_set_action_auto_restore {
> >     my $class = shift;
> >     return bless sig_set_action(@_), $class;
> >   }
> >   sub DESTROY {
> >     shify->sig_set_action();
> >   }
> 
> I'm not sure whether this is relevant here, but I seem to recall a 
> bug reported sometime in the past 3 weeks about signals not being 
> restored at the right time when using eval.  You might want to p5p 
> archives for that.

Thanks Liz for the note.  I have found the discussion, and have down
loaded the fellows test script.  Unfortunately it does NOT reproduce the
bug on my system (current gentoo) with perl 5.8.0  I am building a 5.8.2
perl now to see what that does.

I think I will see if I come up with an object implementation the resets
the handler in on object destruction.  I will then modify his script to
see if the problem persists with Sys::SigHandler, using scope based
resets.  


Reply via email to