emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SIGCHLD in vfork child context


From: Andreas Schwab
Subject: Re: SIGCHLD in vfork child context
Date: Tue, 16 May 2017 11:19:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

On Mai 16 2017, Paul Eggert <address@hidden> wrote:

> YAMAMOTO Mitsuharu wrote:
>> It seems that calling waitpid from the SIGCHLD handler results in
>> ECHILD in the vfork child context
>
> Why is the vfork child process getting a SIGCHLD signal?

In any case, the sigchld handler should handle that case gracefully.
Spurious SIGCHLD should not cause emacs to abort.

> That process
> doesn't have any children. Is the macOS kernel simply buggy? If so, I
> suggest adding a short explanation of the situation to this comment:
>
>> +    /* Call the SIGCHLD handler in case we have received SIGCHLD in
>> +       the vfork child context.  The signal mask is restored by
>> +       unblock_child_signal below.  */
>
> If not, then I don't understand the situation....
>
>> +    (*action.sa_handler) (SIGCHLD);
>
> No need for the * and the first set of parens. I.e., this is OK:
>
>     action.sa_handler (SIGCHLD);
>
> Otherwise, looks OK; thanks.

IMHO this is barking up the wrong tree.

Andreas.

-- 
Andreas Schwab, SUSE Labs, address@hidden
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]