On Wed, Jan 19, 2000 at 06:30:04PM +0000, [EMAIL PROTECTED] wrote:
> Joshua N Pritikin <[EMAIL PROTECTED]> wrote
> > On Wed, Jan 19, 2000 at 12:19:34AM -0500, [EMAIL PROTECTED] wrote:
> > > i am wondering what signal is being handled there as well. sigpipe?
> >
> > You are aware that signal handlers are not safe?
>
> I assume you mean Perl signal handlers. I'd always assumed that the
> Event signal handling was all in C and therefore safe.
Yes and yes. I was asking because the core dump (see the mailing list
archives) was happening inside a perl signal handler.
> I note that the documentation is entirely silent about the relation
> between Perl signal handling and Event signal handling.
Oh! I never imagined the possibility!
> What happens if you mix-n-match? Is this totally verboten?
>
> Is the situation
>
> a) Event takes over all signals
> b) Event takes over signals as/when watchers are installed?
> Is the Perl signal handler restored if a watcher is removed?
> c) Something else
>
> Yes, I know I could read the source to find out, but I'm too lazy. :-)
(B). The API rsignal overrides the current signal handler. If the
signal watcher is cancelled (or otherwise disabled) then rsignal is
reset to SIG_DFL. You bring up a good point here. Maybe the original
handler should be restored. On the other hand, assignment to %SIG will
mess up Event watchers so maybe Event should refuse to watch a signal
if a handler is already installed. Opinions welcome.
--
"Does `competition' have an abstract purpose?"
via, but not speaking for Deutsche Bank