From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#8705: 23.3; Emacs occasionally crashes (segfault) just after starting it Date: Fri, 06 Jul 2012 15:51:58 -0700 Message-ID: <4FF76C0E.9090505@dancol.org> References: <87sjs9ycor.fsf@ypig.lip.ens-lyon.fr> <83sjs9fye5.fsf@gnu.org> <20110520111601.GH1581@prunille.vinc17.org> <20110920145137.GD3058@ypig.lip.ens-lyon.fr> <20120706111317.GA20821@ypig.lip.ens-lyon.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD9E2DAE7540015BF76DDEF13" X-Trace: dough.gmane.org 1341615190 17165 80.91.229.3 (6 Jul 2012 22:53:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2012 22:53:10 +0000 (UTC) Cc: Vincent Lefevre , 8705@debbugs.gnu.org To: Troels Nielsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 07 00:53:09 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SnHOe-0000r6-2F for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jul 2012 00:53:08 +0200 Original-Received: from localhost ([::1]:46123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnHOd-0007Gw-5N for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Jul 2012 18:53:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnHOa-0007Gc-2l for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2012 18:53:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SnHOY-0006cY-9p for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2012 18:53:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnHOY-0006cM-5i for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2012 18:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SnHTN-0002pu-M8 for bug-gnu-emacs@gnu.org; Fri, 06 Jul 2012 18:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Jul 2012 22:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8705-submit@debbugs.gnu.org id=B8705.134161546910885 (code B ref 8705); Fri, 06 Jul 2012 22:58:01 +0000 Original-Received: (at 8705) by debbugs.gnu.org; 6 Jul 2012 22:57:49 +0000 Original-Received: from localhost ([127.0.0.1]:53393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SnHTA-0002pU-09 for submit@debbugs.gnu.org; Fri, 06 Jul 2012 18:57:49 -0400 Original-Received: from dancol.org ([96.126.100.184]:54448) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SnHT7-0002pM-LM for 8705@debbugs.gnu.org; Fri, 06 Jul 2012 18:57:46 -0400 Original-Received: from c-76-22-66-162.hsd1.wa.comcast.net ([76.22.66.162] helo=[0.0.0.0]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1SnHOE-0003bs-8m; Fri, 06 Jul 2012 15:52:42 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: X-Enigmail-Version: 1.4.2 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61673 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD9E2DAE7540015BF76DDEF13 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. --------------enigD9E2DAE7540015BF76DDEF13 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/3bBAACgkQ17c2LVA10Vv72QCfUXdLYzpk+uW7P+gppRWVtF43 VbEAoL7goJ1j/2BadloAb5SROFlrV4v1 =vobP -----END PGP SIGNATURE----- --------------enigD9E2DAE7540015BF76DDEF13--