From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#33154: 27.0.50; create_process on Darwin should not invoke setsid() after vfork() [PATCH] Date: Wed, 7 Nov 2018 07:40:36 -0800 Organization: UCLA Computer Science Department Message-ID: <874fd659-2b77-4b8e-24f5-3296c28f6286@cs.ucla.edu> References: <8237cee2-9e65-4093-8077-a458cf58c911@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1541605149 4720 195.159.176.226 (7 Nov 2018 15:39:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Nov 2018 15:39:09 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 Cc: Alan Third , 33154@debbugs.gnu.org To: Filipp Gunbin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 07 16:39:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKPv5-00015Y-JJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Nov 2018 16:39:03 +0100 Original-Received: from localhost ([::1]:48985 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKPxB-0007gV-Lb for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Nov 2018 10:41:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKPx6-0007gM-2p for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 10:41:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKPx1-0007wn-3B for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 10:41:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35489) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gKPx0-0007vv-KH for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 10:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gKPx0-0000fP-B1 for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 10:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Nov 2018 15:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33154 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33154-submit@debbugs.gnu.org id=B33154.15416052502538 (code B ref 33154); Wed, 07 Nov 2018 15:41:02 +0000 Original-Received: (at 33154) by debbugs.gnu.org; 7 Nov 2018 15:40:50 +0000 Original-Received: from localhost ([127.0.0.1]:39747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKPwo-0000er-0G for submit@debbugs.gnu.org; Wed, 07 Nov 2018 10:40:50 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKPwm-0000ee-AD for 33154@debbugs.gnu.org; Wed, 07 Nov 2018 10:40:48 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 20B5016012E; Wed, 7 Nov 2018 07:40:42 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Ha6L0wXink7G; Wed, 7 Nov 2018 07:40:41 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 52D181600D0; Wed, 7 Nov 2018 07:40:41 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id vXTCR16PCmTT; Wed, 7 Nov 2018 07:40:41 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2BF221600A5; Wed, 7 Nov 2018 07:40:41 -0800 (PST) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:152127 Archived-At: Filipp Gunbin wrote: > Are you sure we can remove that 3rd place? It dates back to initial > revision from 1992. And I can't tell why it's there and what it does. It's there to dissociate the controlling tty. And it's not removed, it's just moved into the previous call to dissociate_controlling_tty (when setsid fails). It is a little disconcerting to change code this old. But we needn't worry about how it would run on 4.3BSD, only on current platforms. On most current platforms setsid suffices because POSIX says it should; on Darwin (and perhaps a few other BSD-derived systems) Emacs can fall back on TIOCNOTTY when setsid fails; and the proposed code does this more systematically than the current master does.