[gnu.emacs.bug] SIGCHLD in subprocesses

markf@ZURICH.AI.MIT.EDU (12/27/89)

There is a problem in emacs 18.55 with the handling of SIGCHLD signals
in subprocesses created by create-process() in process.c. The symptom
is that such subprocesses do not receive SIGCHLD signals from any
further child subprocesses that they might create. 

The problem as I see it is that there is explicit code in process.c to
inhibit the handling of SIGCHLD signals in create-process which is
inherited by the chld process. My fix was to re-enable the handling of
SIGCHLD in the child after the vfork. This works but might not be
exactly want you want. The HP-UX manual page for vfork warns that
during the [vfork, exec] window (i.e. the time in the child between
the vfork and the exec) "installing a catching function can affect
handling of the signal by the parent" if the installation is by
signal() and the handler is not SIG_DFL or SIG_IGN. I'm not sure
whether uses of sigsetmask affect the parent or not.

-Mark


Mark Friedman
MIT Artificial Intelligence Lab
545 Technology Sq.
Cambridge, Ma. 02139

markf@zurich.ai.mit.edu