Uri Guttman <[EMAIL PROTECTED]> writes:
>>>>>> "NI" == Nick Ing-Simmons <[EMAIL PROTECTED]> writes:
>
> NI> Bart Lateur <[EMAIL PROTECTED]> writes:
> >>
> >> Apropos safe signals, isn't it possible to let perl6 handle avoiding
> >> zombie processes internally? What use does having to do wait() yourself,
> >> have anyway?
>
> NI> Valid point - perl could have a CHLD handler in C and stash away returned
> NI> status to pass to wait() when it did get called.
>
>there are plenty of reasons to handle SIGCHLD yourself.
But that was not the topic being discussed. If you DON'T handle CHLD
is the case we were discussing.
>first, you could
>be watching the process and need to know if it dies. if perl handles it
>for you then you need another way to be notified of a process
>death.
What I had in mind was have the C do the wait\w*() save the status
even if there wasn't a perl level CHLD handler.
But I am still in what can we get into perl5.* mode ...
>secondly, SIGCHLD doesn't ncessarily mean a process died, but
>that its status has changed. this could come from a SIGSTP which will
>pasue the child process and let the parent know. i think debugging a
>child will also generate SIGCHLD when the child is breakpointed.
>
>so having perl do the reaping is only good if you set some option like:
>
> $SIG{ CHLD } = 'AUTOREAP' ;
>
>that could be a default if you use the event loop. then some code that
>needs to handle SIGCHLD directly could also do that by setting their own
>handler.
>
>NOTE: i am for a change of syntax away from %SIG. an object interface
>would allow more flexibility and code consistancy with other
>callbacks. see rfc 60 for more.
>
>uri
--
Nick Ing-Simmons