GNU logs - #16019, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#16019: Undocumented interaction with descendants of process created by Emacs (very annoying)
Resent-From: Teika Kazura <teika@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 01 Dec 2013 08:34:02 +0000
Resent-Message-ID: <handler.16019.B.138588678727316 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 16019
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 16019 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.138588678727316
          (code B ref -1); Sun, 01 Dec 2013 08:34:02 +0000
Received: (at submit) by debbugs.gnu.org; 1 Dec 2013 08:33:07 +0000
Received: from localhost ([127.0.0.1]:52515 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Vn2Sg-00076T-Fa
	for submit <at> debbugs.gnu.org; Sun, 01 Dec 2013 03:33:06 -0500
Received: from eggs.gnu.org ([208.118.235.92]:53530)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <teika@HIDDEN>) id 1Vn2Sd-00075z-QA
 for submit <at> debbugs.gnu.org; Sun, 01 Dec 2013 03:33:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <teika@HIDDEN>) id 1Vn2SS-0001vA-6J
 for submit <at> debbugs.gnu.org; Sun, 01 Dec 2013 03:32:58 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:47556)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <teika@HIDDEN>) id 1Vn2SS-0001ux-2i
 for submit <at> debbugs.gnu.org; Sun, 01 Dec 2013 03:32:52 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55235)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <teika@HIDDEN>) id 1Vn2SM-0001YV-90
 for bug-gnu-emacs@HIDDEN; Sun, 01 Dec 2013 03:32:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <teika@HIDDEN>) id 1Vn2SG-0001lx-I7
 for bug-gnu-emacs@HIDDEN; Sun, 01 Dec 2013 03:32:46 -0500
Received: from mout.gmx.net ([212.227.17.21]:57931)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <teika@HIDDEN>) id 1Vn2SG-0001lY-7w
 for bug-gnu-emacs@HIDDEN; Sun, 01 Dec 2013 03:32:40 -0500
Received: from localhost ([123.222.72.213]) by mail.gmx.com (mrgmx003) with
 ESMTPSA (Nemesis) id 0MH0eg-1Vqq4V1nhC-00DrBV for <bug-gnu-emacs@HIDDEN>;
 Sun, 01 Dec 2013 09:32:38 +0100
Date: Sun, 01 Dec 2013 17:30:03 +0900 (JST)
Message-Id: <20131201.173003.1027114851058206117.teika@HIDDEN>
From: Teika Kazura <teika@HIDDEN>
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:djvjqUNTxVfOaGycv64SCY6u3h2enZo0o2ql1gIQh7hhO6LM5hy
 U4cbKjXtYSsCLrMHQhexBdvHuUXQlGOyEIGK3K1EVkOZvuzG2YsQHlf9dCeMAsOoXXadsc+
 V2zShQXpzSYdoyGx67u/+W0Nqik1JhK9wgbjK2Vldf7CwbRiVatAEi7j0yUMjNg/atmxrbN
 SGXTnyO+T+pyBWNuWMCCA==
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

Hi, Emacs developers. Emacs interacts with the forks of a process created by Emacs, but in ways **not documented**, leading to unexpected, very annoying results. Both synchronous and async cases apply, but in different ways.

* Environment:
Gentoo Linux, Emacs 24.3, (at least since 24.1).

* Description:
(I only know, and can test Linux.)
First, synchorous cases. Assume you create a process P with `call-process'. Then Emacs basically waits for the termination of all descendants, not only P. More precisely, it's until all descendants' stdout and stderr, attached to Emacs, get closed. (So probably Emacs waits for the closing of the pipes it opened for P.)

Here, P's output BUFFER doesn't matter. Let's review the grammar:
  (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS)
I mean, BUFFER (and INFILE) doesn't matter. Emacs waits even if they are nil.

Test codes. First, "sync.sh":
------------------------------------------------------------------------
#!/bin/bash

(
    # This is inside of a fork
    sleep 2 ; exec 1>/dev/null
    sleep 1 ; exec 2>/dev/null
    sleep 4
    exit
) &

sleep 1
------------------------------------------------------------------------
Run it with the following:

(let ((now (cadr (current-time))))
  (call-process "/path/to/sync.sh" nil nil nil)
  (message "elapesd %s secs" (- (cadr (current-time)) now))
)

P itself dies in 1 sec, but the "let" ends after 4 secs.


Now, the asynchronous case. When an asynchronous process P, created by `start-process', terminates, all its descendants (perhaps all processes in the process group?) receive SIGHUP from Emacs. It is the default behavior, but if you set `process-connection-type' to nil, then P's subprocesses are not affected.

For asynchronous cases, detaching stdout and stderr has no effect.

Suggestions:
* At least these should be documented, but you may like to modify the implementation. I don't know much about process and inter-process communication, and I can't say anything about it.
* If my description applies to all platforms, then I can contribute a draft of info file and C-src docstrings. (My draft probably will need a review by experts, as I indicated above.) Or, I can help you by formatting your technically correct plain text doc to info.
* (Not related the bug report itself) The names `call-process' and `start-process' are confusing, although you can remember them. I propose to change them to `start-sync-process' and `start-async-process'. (Ineviably their grammars differ, namely in INFILE and NAME. But it's also confusing that the argument positions of the path to the program differ. It's better to fix them too.)

Thank you for reading, and developing Emacs.
Best regards,
Teika (Teika kazura)





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.503 (Entity 5.503)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Teika Kazura <teika@HIDDEN>
Subject: bug#16019: Acknowledgement (Undocumented interaction with
 descendants of process created by Emacs (very annoying))
Message-ID: <handler.16019.B.138588678727316.ack <at> debbugs.gnu.org>
References: <20131201.173003.1027114851058206117.teika@HIDDEN>
X-Gnu-PR-Message: ack 16019
X-Gnu-PR-Package: emacs
Reply-To: 16019 <at> debbugs.gnu.org
Date: Sun, 01 Dec 2013 08:34:03 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 16019 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
16019: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D16019
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 2 Jun 2016 19:59:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 02 15:59:48 2016
Received: from localhost ([127.0.0.1]:52079 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1b8YmS-0002uH-M8
	for submit <at> debbugs.gnu.org; Thu, 02 Jun 2016 15:59:48 -0400
Received: from mail-oi0-f50.google.com ([209.85.218.50]:36843)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1b8YmR-0002u4-Qg
 for control <at> debbugs.gnu.org; Thu, 02 Jun 2016 15:59:48 -0400
Received: by mail-oi0-f50.google.com with SMTP id j1so94593677oih.3
 for <control <at> debbugs.gnu.org>; Thu, 02 Jun 2016 12:59:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:date:message-id:subject:from:to;
 bh=6p7gNCfWiGmmP2jgn/w/2n2yztTo5IdC8EfsJf0R700=;
 b=NE1Z0lbvC4Uu4EOB1381PJLy6oqxYZL8gBao85BzgBXq3Str1HDqO6yGsQ+fCqYJbW
 HWfiSPyLtXRISN5OqsM1Kx+zYcF89fD+/FHDMyZOSLtKceyu+c5BAkABKUuyf6roqW8q
 yUrbkEyuClNOOxFVBbkAyXf870fk2bKYJ4Uw3LBSoDaGs1Y/o/PNssB9CTXl1fknbagn
 K6kZGSGkjzBjHFo4rRJVqxm4sYafGvEE2QrTmbqmF8RXG96Y2ny6tE1EpIONVZrWeQcT
 xrjYSDCMAmc8nkuZeCxxIAywLO/+mjEG+16gND6XUtLUIzr2mI7eat2lILD40RZ+qCMO
 y3wQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:sender:date:message-id:subject:from
 :to; bh=6p7gNCfWiGmmP2jgn/w/2n2yztTo5IdC8EfsJf0R700=;
 b=YNm6fONi5GUuWW/56UTDQz/LdgnDFXraVSo0lPt/qLX1Vt3SxJufNmyiXV8xri6bwI
 rt+5evcg0ZvXCCK5ybkQXt9RdEFpDG6DSmYH4x4HwPly0B7g4a+sVHehq05s7cVVlnMR
 K3piHxSEo4NjfhFEftZLaJrqNwDuZLwWi5MA9iBMZD+UQYUG5t6x9isUwsWba+PdIy1K
 Ya2UkqZkhb3s6FXNYt9d5Z2w1OWdT156Elw/XzeNAupPI6AP+xPThBlxL4PKdRodCTDx
 AJc1OI56pCjAj1F+etNF8Gf3lckkoT7yVlH7Uz6ut0MwAj5W7LEHkbYG82/J3uwxpxCX
 X43w==
X-Gm-Message-State: ALyK8tLnsbmPiLfEvVeIDBGJG4P5oEZkin/zuZJFeb0+v10AhyVliqC5b/jm2TjUttNpsqOOxMFag/1w92j3MA==
MIME-Version: 1.0
X-Received: by 10.157.23.195 with SMTP id j61mr7933558otj.92.1464897581957;
 Thu, 02 Jun 2016 12:59:41 -0700 (PDT)
Received: by 10.157.34.169 with HTTP; Thu, 2 Jun 2016 12:59:41 -0700 (PDT)
Date: Thu, 2 Jun 2016 15:59:41 -0400
X-Google-Sender-Auth: 6x3Rib9xkNfu8pZmno1RSRWexow
Message-ID: <CAM-tV-8A3rPRO+vXufoq57b2nivMWg9pFP3hLoaGQ7K_-X7G-Q@HIDDEN>
Subject: How to stop children of pty subprocesses from receiving a SIGHUP when
 main subprocess exits?
From: Noam Postavsky <npostavs@HIDDEN>
To: control <at> debbugs.gnu.org
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

forcemerge 16019 21866
quit




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 3 Jul 2016 02:57:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 02 22:57:45 2016
Received: from localhost ([127.0.0.1]:35026 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bJXbM-0004VV-U9
	for submit <at> debbugs.gnu.org; Sat, 02 Jul 2016 22:57:45 -0400
Received: from mail-it0-f49.google.com ([209.85.214.49]:35486)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1bJXbL-0004VI-3t
 for control <at> debbugs.gnu.org; Sat, 02 Jul 2016 22:57:43 -0400
Received: by mail-it0-f49.google.com with SMTP id j185so8400181ith.0
 for <control <at> debbugs.gnu.org>; Sat, 02 Jul 2016 19:57:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:date:message-id:to:from:subject;
 bh=GGqwALdvWjCZoo0u+kDatOtIJvC2MqDxOo2oVDfLVCA=;
 b=ZDeKFhhwd9FyAPpWCI0GZEQTC50YrLxardXRLEULKsNPEa8OblCRnb6KXuZqHcTiDF
 SYOeYDKTLoV/3rbP8jUBImE/+iMvlbmramiWwqzaXgKDA+i2axHFYSeI+lepJIFI2zFy
 eV1RvpbYNxpQo+ljy5GICbxvZC0EHURiw7W2LtM5QBm8cqXq/2fdtpRbePXeNrngUptu
 irPE7mV7ndFnJAIFMLf045WBmKKIuKEYFJWlzYSduWGxXWT1/9+KvXrAdFcAdbZKN294
 DnZlXWCNW6jKVz09XaVnisN5iO/jR6wlmNC1gBIJNslTyWqifzwgxgyu67jpbgvttgDo
 he6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:date:message-id:to:from:subject;
 bh=GGqwALdvWjCZoo0u+kDatOtIJvC2MqDxOo2oVDfLVCA=;
 b=OeD0JpPetx5ibrpG216v+F+yU1vOEf56lRf+7BbA4LPOynPRxKG8Cht87Fb0kp+5nB
 oCl7XHTZES6nlpRJjexUXebxoNdyrhboafhY41FXzQT3S/i74EMqN0XLUI7EeWpMFJC+
 oD8B+jGbOhr/bbMOtNzlFakL/DJik56BTcX+VAC20C/Pxv8X5gg4wST0nt+C7VOmDc1x
 OHPYuXWbRWyYM6n+ibe0CH/LNHWC+dWuPQFOaTXfrynEtImKPaRA/Aq/h2oGX2o6ctJw
 hzETSAlyWrmgC4L71FA7vgS1xgNOYCzVSjM8ShQrCRggTASPCEjqb7OcdRXP8LSKW+Bs
 Mqeg==
X-Gm-Message-State: ALyK8tJ+1ZlJUtLe2dE8f+I1BZA54LJ2jDnbMA8E3LR3kuPUgChJ3hbUqsTi5GcSf4A3iA==
X-Received: by 10.36.46.80 with SMTP id i77mr4798072ita.60.1467514657367;
 Sat, 02 Jul 2016 19:57:37 -0700 (PDT)
Received: from zony (206-188-64-44.cpe.distributel.net. [206.188.64.44])
 by smtp.googlemail.com with ESMTPSA id f129sm9234448ioe.35.2016.07.02.19.57.36
 for <control <at> debbugs.gnu.org>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 02 Jul 2016 19:57:36 -0700 (PDT)
Date: Sat, 02 Jul 2016 22:57:46 -0400
Message-Id: <87k2h3fmxh.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: npostavs@HIDDEN
Subject: control message for bug #21617
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

forcemerge 21617 16019




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 2 Apr 2018 23:49:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 02 19:49:36 2018
Received: from localhost ([127.0.0.1]:35597 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f39Ci-0002dv-1f
	for submit <at> debbugs.gnu.org; Mon, 02 Apr 2018 19:49:36 -0400
Received: from mail-io0-f175.google.com ([209.85.223.175]:34165)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1f39Cg-0002dg-Kh; Mon, 02 Apr 2018 19:49:35 -0400
Received: by mail-io0-f175.google.com with SMTP id d6so17833204iog.1;
 Mon, 02 Apr 2018 16:49:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=4pLFMytr5H7a4OeTFT5x4NyuWTONKRar5imzU/FCo8s=;
 b=FQNjkbVpDeiUrMZlM9ORv4joECASofuOeumbpRmhArRFIhxQrTedjVKyNtsF9e+s6l
 SW39QM/B69qxLP+GGwAYyhWjNIdCXA1lEd31cVyQV83SoWiqtbXdCX8zp4xbOiInHuKj
 RPzE3sLKPrQjOeie1t2+V4m8voEkRlmwzh1xqmjH5aqqP7D2R4ZGudljzHmrxRfoRRFU
 H3Gro/a01O2r86QO4StVZlKwws+Z0ysXiLQJOvfxTLg+FEaCUNGyi8u3qVHHUSqlHoHC
 jD5789Drc3/IlWvj2D/eTozSIsuMWNws/+76/5yeEQ5AbW4U278XSxG66AXVsIhSfpT6
 Ho2Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=4pLFMytr5H7a4OeTFT5x4NyuWTONKRar5imzU/FCo8s=;
 b=EE88frJ6AsqW+hocI9IfrFLwaxSrlORyQJhXF3djlrbEu24VYVRpbOZ9pjuNctz6bp
 DtakIZj3p5jVyij3usgYAlnBSY3NEC+lSQx8/eNJpfJKJ9znpJmWeyOJwJSfrJUzoG4A
 Gkmo+jbj79SJwjpnCSwk3bKnBODUyLLftgYZ3y+bmEreeEF/cpTlYjeRVtvQXUx/kMso
 i3wqhCz6a1NAvhxzwDIPioZGzvGkN0XODsE44BtbPf5tzjk9R2DMr9K3v6u8R/Is+hDv
 R1Wj66PYRiZas+URN2+qVqiK3o2vzTVW1ZU5tgHLLh7KOZ/ECVwOtfFOUNusPmiW+mrS
 j4Vg==
X-Gm-Message-State: AElRT7GwI+byqxvzaRh+wAkcbziRGpFvBkewZ2vSjV2IsT6cZtobYFQt
 QOlPX0rBtH7nQ+3OYXD0qi0WfQ==
X-Google-Smtp-Source: AIpwx48bBD0NplbhIe52gLmgNitH3up4zupRponwqzUb7h1Xf534cF2OiQInm5B24EHq07IMmw/GwQ==
X-Received: by 10.107.58.134 with SMTP id h128mr10170604ioa.299.1522712968819; 
 Mon, 02 Apr 2018 16:49:28 -0700 (PDT)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 z64sm723590ioi.51.2018.04.02.16.49.27
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 02 Apr 2018 16:49:28 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: 15695 <at> debbugs.gnu.org
Subject: Re: bug#15695: 24.3;
 multiple async shell commands at once run randomly
References: <877gd3ofhy.fsf@HIDDEN> <87wp00ixfx.fsf@HIDDEN>
Date: Mon, 02 Apr 2018 19:49:27 -0400
In-Reply-To: <87wp00ixfx.fsf@HIDDEN> (Noam Postavsky's message
 of "Mon, 29 Jan 2018 08:52:50 -0500")
Message-ID: <87sh8dnp88.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: control
Cc: Nicolas Richard <theonewiththeevillook@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

merge 15695 16019
quit

> If I set process-connection-type to nil, then I get expected results

> This problem is also talked about in [1] and [2].
>
> [1]: http://nullprogram.com/blog/2018/01/17/
> [2]: http://nullprogram.com/blog/2014/02/06/#pseudo-terminals

Actually, I don't think this bug is a problem of Emacs losing data after
all, it's just that the shell does the 'echo baz' and then usually exits
before the other echo commands get to run (when running with a pty,
Emacs sends SIGHUP to all child process in the terminal).  If I add a ";
wait" to the shell command, then I get

"baz\nbar\nfoo\n": 374
"baz\nfoo\nbar\n": 428
"foo\nbaz\nbar\n": 17
"bar\nfoo\nbaz\n": 1

which is as expected.  I'm merging with #16019 which is about Emacs
sending SIGHUP to all child processes of a pty subprocess.






Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.