GNU bug report logs - #48129
28.0.50; Per file-handle (stdin, stdout and stderr) process-connection-type variable

Previous Next

Package: emacs;

Reported by: Thomas Hisch <thomas.hisch <at> ims.co.at>

Date: Fri, 30 Apr 2021 23:11:01 UTC

Severity: wishlist

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Thomas Hisch <thomas.hisch <at> ims.co.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 48129 <at> debbugs.gnu.org, larsi <at> gnus.org
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

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ält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe 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) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly 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 <at> ims.co.at; DVR-Nr: 0374369; www.ims.co.at




This bug report was last modified 3 years and 342 days ago.

Previous Next


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