unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Thomas Hisch <thomas.hisch@ims.co.at>
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:31:56 +0300	[thread overview]
Message-ID: <835yyj85g3.fsf@gnu.org> (raw)
In-Reply-To: <65069cf7-6ac2-57d3-4430-b83f91d93b81@ims.co.at> (message from Thomas Hisch on Sat, 12 Jun 2021 16:23:29 +0200)

> Date: Sat, 12 Jun 2021 16:23:29 +0200
> CC: <48129@debbugs.gnu.org>
> From: Thomas Hisch <thomas.hisch@ims.co.at>
> 
> > Eli Zaretskii <eliz@gnu.org> 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?





  reply	other threads:[~2021-06-12 15:31 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 [this message]
2021-06-12 16:49               ` Thomas Hisch
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=835yyj85g3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=48129@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=thomas.hisch@ims.co.at \
    /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).