From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Troels Nielsen Newsgroups: gmane.emacs.bugs Subject: bug#8705: 23.3; Emacs occasionally crashes (segfault) just after starting it Date: Sat, 7 Jul 2012 17:08:18 +0200 Message-ID: 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> <4FF76C0E.9090505@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1341673749 20126 80.91.229.3 (7 Jul 2012 15:09:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Jul 2012 15:09:09 +0000 (UTC) Cc: Vincent Lefevre , 8705@debbugs.gnu.org To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 07 17:09:08 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 1SnWd8-0003U8-5c for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jul 2012 17:09:06 +0200 Original-Received: from localhost ([::1]:57038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnWd6-0004An-VE for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jul 2012 11:09:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnWd3-0004Ad-Ce for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2012 11:09:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SnWd1-00040u-12 for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2012 11:09:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnWd0-00040l-R8 for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2012 11:08:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SnWhu-0006BT-Gz for bug-gnu-emacs@gnu.org; Sat, 07 Jul 2012 11:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Troels Nielsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Jul 2012 15:14:02 +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.134167400523721 (code B ref 8705); Sat, 07 Jul 2012 15:14:02 +0000 Original-Received: (at 8705) by debbugs.gnu.org; 7 Jul 2012 15:13:25 +0000 Original-Received: from localhost ([127.0.0.1]:54927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SnWhI-0006AY-O5 for submit@debbugs.gnu.org; Sat, 07 Jul 2012 11:13:24 -0400 Original-Received: from mail-qa0-f44.google.com ([209.85.216.44]:58665) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SnWhG-0006AQ-Qk for 8705@debbugs.gnu.org; Sat, 07 Jul 2012 11:13:23 -0400 Original-Received: by qadz3 with SMTP id z3so1011141qad.3 for <8705@debbugs.gnu.org>; Sat, 07 Jul 2012 08:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+T7yQP/G/7700wxymh14f6I1zPisWgzsb+ss7YqXROk=; b=Op/xLFWSrCZKrcbBdpTuRE2sLf3imw2zPtq5U224alEb7x0RNTUuq/90z8prQPsceW g/njWnj31VZjWRhS0rsbEPlw581xftsybtZrdBwG0oFatAJtS1D/U58Y/c1Wp89oUvCH Lv77UPxSL+NGxn4hbuecPV+LtXE3l+m9EvKe/Q7bfYSx/QvnZvHs6YfWF5yL3MOyePUm pFfllnkukDkoySekeTfV5WuG1EuvMloxyA3dbwcSU5NbFDy7rekZPuivwYpmujvOOkDW 4ZXLw3WdeBvOe6jS0TpK0retVEZOnQVWhwexeJv6zt+Ox80tbY2k1A/5pyvkY62HwfA9 pm9Q== Original-Received: by 10.224.182.136 with SMTP id cc8mr36202113qab.60.1341673698266; Sat, 07 Jul 2012 08:08:18 -0700 (PDT) Original-Received: by 10.229.88.143 with HTTP; Sat, 7 Jul 2012 08:08:18 -0700 (PDT) In-Reply-To: <4FF76C0E.9090505@dancol.org> 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:61690 Archived-At: > 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. > Yes, looking into the problem more deeply I realize that the patch is wrong. In fact it only substitutes one race condition for a more severe one. posix_spawn may be the right thing but I don't know how broadly available it is. Another possibility would be using vfork+execle, as far as I can see it is standardized, has been available for quite some time and it won't make problems with setsid. The use of execvp is likely just due to the age of these parts. Regards Troels