From: Andreas Schwab <schwab@suse.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>, emacs-devel@gnu.org
Subject: Re: SIGCHLD in vfork child context
Date: Tue, 16 May 2017 11:19:43 +0200 [thread overview]
Message-ID: <mvm37c540r4.fsf@suse.de> (raw)
In-Reply-To: <a8f4c9e7-e11f-a33d-e5a0-c4137932ff0b@cs.ucla.edu> (Paul Eggert's message of "Tue, 16 May 2017 01:58:37 -0700")
On Mai 16 2017, Paul Eggert <eggert@cs.ucla.edu> 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, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2017-05-16 9:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-13 5:41 SIGCHLD in vfork child context YAMAMOTO Mitsuharu
2017-05-15 1:04 ` YAMAMOTO Mitsuharu
2017-05-16 8:58 ` Paul Eggert
2017-05-16 9:19 ` Andreas Schwab [this message]
2017-05-16 9:50 ` Paul Eggert
2017-05-16 10:22 ` Andreas Schwab
2017-05-19 7:16 ` Paul Eggert
2017-05-19 3:19 ` YAMAMOTO Mitsuharu
2017-05-19 7:18 ` Paul Eggert
2017-05-20 8:22 ` YAMAMOTO Mitsuharu
2017-05-21 8:49 ` Paul Eggert
2017-05-21 8:53 ` mituharu
2017-05-21 9:01 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mvm37c540r4.fsf@suse.de \
--to=schwab@suse.de \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=mituharu@math.s.chiba-u.ac.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).