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


Message #30 received at 48129 <at> debbugs.gnu.org (full text, mbox):

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




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.