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: YAMAMOTO Mitsuharu
Subject: Re: SIGCHLD in vfork child context
Date: Mon, 15 May 2017 10:04:03 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shij┼Ź) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Sat, 13 May 2017 14:41:59 +0900, YAMAMOTO Mitsuharu <address@hidden> 
>>>>> 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
                                address@hidden



reply via email to

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