From: Thomas Hisch <thomas.hisch@ims.co.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 48129@debbugs.gnu.org, larsi@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 [thread overview]
Message-ID: <ab7d7cfe-e440-bb6e-a4dc-04de60697dad@ims.co.at> (raw)
In-Reply-To: <835yyj85g3.fsf@gnu.org>
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@ims.co.at; DVR-Nr: 0374369; www.ims.co.at
next prev parent reply other threads:[~2021-06-12 16:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 23:10 bug#48129: 28.0.50; Per file-handle (stdin, stdout and stderr) process-connection-type variable Thomas Hisch
2021-05-01 6:09 ` Eli Zaretskii
2021-05-02 10:19 ` Thomas Hisch
2021-05-07 19:46 ` Thomas Hisch
2021-05-15 7:23 ` Eli Zaretskii
2021-06-12 12:18 ` Lars Ingebrigtsen
2021-06-12 14:23 ` Thomas Hisch
2021-06-12 15:31 ` Eli Zaretskii
2021-06-12 16:49 ` Thomas Hisch [this message]
2021-06-12 15:48 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab7d7cfe-e440-bb6e-a4dc-04de60697dad@ims.co.at \
--to=thomas.hisch@ims.co.at \
--cc=48129@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).