From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Hisch 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:49:40 +0200 Message-ID: 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> <835yyj85g3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2600"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Thunderbird/90.0 Cc: 48129@debbugs.gnu.org, larsi@gnus.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 12 18:50:24 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 1ls6pz-0000TW-KP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Jun 2021 18:50:23 +0200 Original-Received: from localhost ([::1]:45288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ls6py-0002uT-Aa for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Jun 2021 12:50:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ls6pe-0002uF-Pa for bug-gnu-emacs@gnu.org; Sat, 12 Jun 2021 12:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58658) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ls6pe-00034F-6a for bug-gnu-emacs@gnu.org; Sat, 12 Jun 2021 12:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ls6pe-0001ag-5g for bug-gnu-emacs@gnu.org; Sat, 12 Jun 2021 12:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Hisch Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Jun 2021 16:50: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.16235165906088 (code B ref 48129); Sat, 12 Jun 2021 16:50:02 +0000 Original-Received: (at 48129) by debbugs.gnu.org; 12 Jun 2021 16:49:50 +0000 Original-Received: from localhost ([127.0.0.1]:41971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls6pR-0001a8-Ot for submit@debbugs.gnu.org; Sat, 12 Jun 2021 12:49:50 -0400 Original-Received: from mail.ims.co.at ([82.218.133.45]:14139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ls6pP-0001Zu-KG for 48129@debbugs.gnu.org; Sat, 12 Jun 2021 12:49:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ims.co.at; s=ims; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=djoUQk5jdzIusQwU97NRhM4H7OOmqmyYyCeOweg2kHo=; b=ja7S/Qc0M9JNrmM/nGnHBXWsOx3VXTrTP/Zz5yhIwvVHLfM8gAEqbR5l o3Q0Z0rQBBd5GoWSUSVPlT7clVDJjS7nu4n6kotx8MqEbtjaJdqgvWDwi yXJeBV7WGJJkfPlds8uo3FlVIv2I5pnDdjJNXD6a7fZOQkwk0gs2/k2Ni Y=; IronPort-SDR: FsbBsMGv4kBR37KvW9OcEVw5ibg31bvOK7tLPRRKdwVSk+TX7X3xzq1Ezbm6nt5pt3j0qui1O+ 0BqNtOUf3bBQ== X-IronPort-AV: E=Sophos;i="5.83,268,1616454000"; d="scan'208";a="979103" Content-Language: en-US In-Reply-To: <835yyj85g3.fsf@gnu.org> X-Originating-IP: [10.119.100.99] X-ClientProxiedBy: srv-xchg-02.ims.co.at (10.120.20.62) To srv-xchg-02.ims.co.at (10.120.20.62) 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:208393 Archived-At: On 6/12/21 17:31, Eli Zaretskii wrote: >> * 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? I guess you mean a technical issue in emacs and not in the OS, right? cpython e.g. doesn't have this limitation. In cpython you can pass one of the following values to each file handle (stdin, stdout, stderr) in the subprocess module: (see https://docs.python.org/3.10/library/subprocess.html#subprocess.Popen) subprocess.DEVNULL Special value that can be used as the stdin, stdout or stderr argument to Popen and indicates that the special file os.devnull will be used. subprocess.PIPE Special value that can be used as the stdin, stdout or stderr argument to Popen and indicates that a pipe to the standard stream should be opened. Most useful with Popen.communicate(). subprocess.STDOUT Special value that can be used as the stderr argument to Popen and indicates that standard error should go into the same handle as standard output. It is also possible to use > an existing file descriptor (a positive integer), an existing file object, and None. If you want to assign a file handle to pty you have to pass a file descriptor to one of the handles (stdin,stdout,stderr) It would be nice if emacs were as flexible as cpython w.r.t. configuring file handles for subprocesses. > 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? > Diese E-Mail enth=C3=A4lt vertrauliche und/oder rechtlich gesch=C3=BCtzte I= nformationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail i= rrt=C3=BCmlich erhalten haben, informieren Sie bitte sofort den Absender un= d vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte We= itergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you = are not the intended recipient (or have received this e-mail in error) plea= se notify the sender immediately and destroy this e-mail. Any unauthorized = copying, disclosure or distribution of the material in this e-mail is stric= tly prohibited. IMS Nanofabrication GmbH FN: 208021 p, FB-Gericht: Wien; Sitz: Schreygasse = 3, 1020, Vienna (Austria),Tel. +43 1 214 48 94; E-Mail: imsoffice@ims.co.at= ; DVR-Nr: 0374369; www.ims.co.at