all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: emacs-devel@gnu.org
Subject: Re: SIGCHLD in vfork child context
Date: Mon, 15 May 2017 10:04:03 +0900	[thread overview]
Message-ID: <wlshk77wxo.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <wl4lwp5n4o.wl%mituharu@math.s.chiba-u.ac.jp>

>>>>> On Sat, 13 May 2017 14:41:59 +0900, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> said:

> Recently Emacs on Darwin has changed to use vfork rather than fork
> for performance reasons (Bug#26397).  The latest Mac port contains a
> similar change, but I received a report telling that this causes
> occasional hangs.

> It seems that calling waitpid from the SIGCHLD handler results in
> ECHILD in the vfork child context, and in this case, Emacs aborts
> and then hangs in such a context for some reason on macOS.

> I made a patch below to avoid calling the SIGCHLD handler on Darwin,
> but I wonder if this can also be meaningful in other platforms.
> WDYT?

The original reporter could come up with a procedure to reproduce:

1. Enter (call-process-region "abc" nil "cat" nil 0) in *scratch*
2. C-x ( C-x C-e C-x ) to define a macro that evaluates that form
3. C-u 2000 C-x e to evaluate the form 2000 times

I could reproduce the hang on macOS, but not on GNU/Linux.  Could
other platform users try it to see if the patch for Darwin is also
meaningful there?


				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp



  reply	other threads:[~2017-05-15  1:04 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 [this message]
2017-05-16  8:58 ` Paul Eggert
2017-05-16  9:19   ` Andreas Schwab
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wlshk77wxo.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.