From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#48129: 28.0.50; Per file-handle (stdin, stdout and stderr) process-connection-type variable Date: Sat, 12 Jun 2021 18:31:56 +0300 Message-ID: <835yyj85g3.fsf@gnu.org> References: <83o8dv9e8s.fsf@gnu.org> <10473f20-aad5-a4a2-528e-088ac14bfb74@ims.co.at> <83fsyoxxy9.fsf@gnu.org> <87bl8b8eeh.fsf@gnus.org> <65069cf7-6ac2-57d3-4430-b83f91d93b81@ims.co.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11055"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48129@debbugs.gnu.org, larsi@gnus.org To: Thomas Hisch Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 12 17:33:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ls5dF-0002ie-TI for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Jun 2021 17:33:09 +0200 Original-Received: from localhost ([::1]:49722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ls5dE-0006ub-8i for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Jun 2021 11:33:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls5d9-0006uT-4U for bug-gnu-emacs@gnu.org; Sat, 12 Jun 2021 11:33:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ls5d8-0007pl-P3 for bug-gnu-emacs@gnu.org; Sat, 12 Jun 2021 11:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ls5d8-00062k-Ee for bug-gnu-emacs@gnu.org; Sat, 12 Jun 2021 11:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Jun 2021 15:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48129 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 48129-submit@debbugs.gnu.org id=B48129.162351193323169 (code B ref 48129); Sat, 12 Jun 2021 15:33:02 +0000 Original-Received: (at 48129) by debbugs.gnu.org; 12 Jun 2021 15:32:13 +0000 Original-Received: from localhost ([127.0.0.1]:41941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls5cL-00061d-ET for submit@debbugs.gnu.org; Sat, 12 Jun 2021 11:32:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls5cJ-00061Q-PL for 48129@debbugs.gnu.org; Sat, 12 Jun 2021 11:32:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43050) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ls5cD-0007KE-GD; Sat, 12 Jun 2021 11:32:05 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3675 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls5cC-0001Rm-Vo; Sat, 12 Jun 2021 11:32:05 -0400 In-Reply-To: <65069cf7-6ac2-57d3-4430-b83f91d93b81@ims.co.at> (message from Thomas Hisch on Sat, 12 Jun 2021 16:23:29 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208390 Archived-At: > Date: Sat, 12 Jun 2021 16:23:29 +0200 > CC: <48129@debbugs.gnu.org> > From: Thomas Hisch > > > Eli Zaretskii writes: > > > >> If it's possible to solve your problem by using make-pipe-process, I'd > >> prefer such a solution. Introducing yet another obscure option to > >> make-process should best be avoided, IMO. > > Yes I agree, if I could use make-pipe-process I would use it, but I > guess it doesn't work. > > > (let* ((stderr-buffer (get-buffer-create "*stderr*")) > (stderr-pipe-proc (make-pipe-process :name "stderr" > :buffer stderr-buffer)) > (stdout-buffer (get-buffer-create "*temp*"))) > (make-process > :name "isatty" > ;; what do I want? > ;; I want stdin to be connected to a pty but not stdout > :buffer stdout-buffer > :connection-type 'pty > :stderr stderr-pipe-proc > :command (list "/tmp/output-isatty.py"))) > > What have I tried: > > * toggling the connection-type arguement doesn't have any impact on the > output of the python script, which is run as a subprocess. > > * if a stderr argument is passed to make-process and the value is a the > pipe-process, then both stdin as well as stdout in the subprocess are > connected non-pty devices > > * if a stderr argument is not passed to make-process, then both stdin as > well as stdout in the subprocess are connected to pty devices. Indeed, I forgot that using :stderr with make-process automatically resets the process connection typ to use pipes for all the 3 standard handles. I guess there's some technical issue underlying that? Because we had that restriction since day one. Perhaps using PTYs means that stderr must be redirected to the same device as stdout or something?