From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.bugs Subject: bug#33050: 27.0.50; [macOS] Problem with process input with process-connection-type nil Date: Wed, 24 Oct 2018 17:05:39 +0300 Message-ID: References: <83a7n9udxv.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1540390319 4316 195.159.176.226 (24 Oct 2018 14:11:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 24 Oct 2018 14:11:59 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) Cc: 33050@debbugs.gnu.org To: Thomas Fitzsimmons Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 24 16:11:55 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 1gFJt4-00013D-KW for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Oct 2018 16:11:54 +0200 Original-Received: from localhost ([::1]:48704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFJvB-00030k-3i for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Oct 2018 10:14:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFJnT-0003wL-FB for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2018 10:06:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFJnP-0007we-Ad for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2018 10:06:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36106) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFJnP-0007wW-6O for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2018 10:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gFJnO-0002BM-Sl for bug-gnu-emacs@gnu.org; Wed, 24 Oct 2018 10:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Filipp Gunbin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Oct 2018 14:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33050 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33050-submit@debbugs.gnu.org id=B33050.15403899458362 (code B ref 33050); Wed, 24 Oct 2018 14:06:02 +0000 Original-Received: (at 33050) by debbugs.gnu.org; 24 Oct 2018 14:05:45 +0000 Original-Received: from localhost ([127.0.0.1]:40364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFJn7-0002An-EX for submit@debbugs.gnu.org; Wed, 24 Oct 2018 10:05:45 -0400 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:53483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFJn6-0002Ag-CE for 33050@debbugs.gnu.org; Wed, 24 Oct 2018 10:05:44 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 4E677E94; Wed, 24 Oct 2018 10:05:43 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 24 Oct 2018 10:05:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm1; bh= n0M/P6kn7pWpjia5GSEvw8/dHE+RRq1AsT9rZC/0nu8=; b=El4AJEJa4+Z3KrHT jLQaoklWx3J4b0+Du4omtFkFm1geTk4x2KFpVeM4IJURqXEgk18K94UuAuSKAUmk IlMMTyPUKVgtzfiN3g6X9NttM5CzuSAHUinvwJJlHoqGjxaMHeNDIHOmoy5XD1XD jWWXYYwVAwwd2+jKdC16SQharK/bJBpwjMIM9NtJSQ7L/N8ymice9eq9Ksf/CV+W v4T7LDVgbHZhQpvwp/GMHGnJ/kRo22F0CxIrb60D+7r0B4ZVQB1QLIVXh3XSg5Ao FabmZ/4FBY8QDwDlYqRUQ0vXx4CVcka9ly39JcVdFd7RKcnxy5DeDRPgZXGhkwq4 8jQmgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=n0M/P6kn7pWpjia5GSEvw8/dHE+RRq1AsT9rZC/0n u8=; b=CPXvgC9wZDBI5KE8haSFse0BDfWSlf8lh4Q34TVMW4G7BzqSr3TUNwcdy yqrMPcZoDaJF9Y1yARAipxXzLlU4DQNKmsoSZ4dVEtwwqeO6zCsUUN3fAUfNdnZu aYmdBj5YOeAEVj1YQfnocNw4/YM/BQRBSfrYHLLkO9cqLgHYtFIOGyTrIsmQo3gw izabCbLqf3e+ci/A3YRLzPp3AsVJgbeCLOgK1rbSV0GGmR/3ovTSrKRvyJpyFs0y To4H1HEMh+IPgLatxuX69UG6DQhO4gBXgTq9GluhmlJc6QLNeYfaw+jtV7FVPXzc xkeeAUntT7PybZ4Ido3+VwDl5LiUw== X-ME-Sender: X-ME-Proxy: Original-Received: from fgunbin.playteam.ru (unknown [95.161.147.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 5912A102DE; Wed, 24 Oct 2018 10:05:41 -0400 (EDT) In-Reply-To: (Thomas Fitzsimmons's message of "Tue, 23 Oct 2018 21:55:13 -0400") 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:151552 Archived-At: This may be the clue to the problem: man termios(4): If a process is in the foreground process group of its controlling termi- nal, read operations are allowed. Any attempts by a process in a back- ground process group to read from its controlling terminal causes a SIGTTIN signal to be sent to the process's group unless one of the fol- lowing special cases apply: If the reading process is ignoring or block- ing the SIGTTIN signal, or if the process group of the reading process is orphaned, the read(2) returns -1 with errno set to EIO and no signal is sent. The default action of the SIGTTIN signal is to stop the process to which it is sent. I output the process-attributes of the started process, and note tpgid (ID of foreground process group on the process=E2=80=99s tty) and tty: - p-c-t t attrs=3D((etime 0 0 7080 0) (start 23504 29912 167367 0) (nice . 0) (tpgid . 16419) (tty . ttys001) (pgrp . 16419) (ppid . 98669) (state . R) (comm . ldapsearch) (group . staff) (egid . 20) (user . fgunbin) (euid . 501)) ldapsearch's pgrp=3D16419, it is using ttys001 for r/w, and it's in foreground process group on that tty (tpgid . 16419) - p-c-t nil attrs=3D((etime 0 0 6177 0) (start 23504 29897 662718 0) (nice . 0) (tpgid . 98669) (tty . ttys000) (pgrp . 16416) (ppid . 98669) (state . R) (comm . ldapsearch) (group . staff) (egid . 20) (user . fgunbin) (euid . 501)) ldapsearch's pgrp=3D16416, it is using ttys000 for r/w (??), and it is NOT in foreground process group on that tty - (tpgid . 98669). 98669 is emacs, and emacs is in foreground - this is ok. So the question is - why the process in the second case thinks that it has a tty? When it tries to use it, it receives SIGTTIN and is stopped, as termios man page says. My test case with p-c-t nil results in the processed being stopped, indeed. My knowledge of these things is very limited, forgive me if I'm clearly wrong somewhere. Filipp