[Top][All Lists]

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

bug#8705: 23.3; Emacs occasionally crashes (segfault) just after startin

From: Daniel Colascione
Subject: bug#8705: 23.3; Emacs occasionally crashes (segfault) just after starting it
Date: Fri, 06 Jul 2012 15:51:58 -0700
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

On 7/6/2012 1:32 PM, Troels Nielsen wrote:
> It appears this is due to Fcall_process not restoring environ before
> after UNBLOCK_INPUT. This is too late in your case.
> The patch below against trunk, ought to fix it with minimal
> intervention. But I think a better fix would be to abandon the use of
> vfork and just use fork (which should be almost as fast), as the work
> in the child process after vfork is undefined behavior as far as I can
> understand.

Better yet, we can use posix_spawn, falling back to gnulib's
implementation of posix_spawn in terms of fork or vfork. Unfortunately,
posix_spawn has no way of telling the child to setsid, so the best we
could do would be setpgrp. I have patches to use posix_spawn in the
call_process case, but not the async case.

I'm not entirely sure how much of a difference avoiding setsid makes. In
the meantime, retaining support for vfork would be nice, because on some
platforms, like Cygwin, fork is still very slow.

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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