1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-09 05:01:02 -08:00
emacs/lisp/eshell
Jim Porter d7b89ea407 Allow creating processes where only one of stdin or stdout is a PTY
* src/lisp.h (emacs_spawn):
* src/callproc.c (emacs_spawn): Add PTY_IN and PTY_OUT arguments to
specify which streams should be set up as a PTY.
(call_process): Adjust call to 'emacs_spawn'.

* src/process.h (Lisp_Process): Replace 'pty_flag' with 'pty_in' and
'pty_out'.

* src/process.c (is_pty_from_symbol): New function.
(make-process): Allow :connection-type to be a cons cell, and allow
using a stderr process with a PTY for stdin/stdout.
(create_process): Handle creating a process where only one of stdin or
stdout is a PTY.

* lisp/eshell/esh-proc.el (eshell-needs-pipe, eshell-needs-pipe-p):
Remove.
(eshell-gather-process-output): Use 'make-process' and set
':connection-type' as needed by the value of 'eshell-in-pipeline-p'.

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't signal an
error when ':connection-type' is a cons cell.

* test/src/process-tests.el
(process-test-sentinel-wait-function-working-p): Allow passing PROC
in, and rework into...
(process-test-wait-for-sentinel): ... this.
(process-test-sentinel-accept-process-output)
(process-test-sentinel-sit-for, process-test-quoted-batfile)
(process-test-stderr-filter): Use 'process-test-wait-for-sentinel'.
(make/process/test-connection-type): New function.
(make-process/connection-type/pty, make-process/connection-type/pty-2)
(make-process/connection-type/pipe)
(make-process/connection-type/pipe-2)
(make-process/connection-type/in-pty)
(make-process/connection-type/out-pty)
(make-process/connection-type/pty-with-stderr-buffer)
(make-process/connection-type/out-pty-with-stderr-buffer): New tests.

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test--detect-pty-cmd):
New variable.
(esh-proc-test/pipeline-connection-type/no-pipeline)
(esh-proc-test/pipeline-connection-type/first)
(esh-proc-test/pipeline-connection-type/middle)
(esh-proc-test/pipeline-connection-type/last): New tests.

* doc/lispref/processes.texi (Asynchronous Processes): Document new
':connection-type' behavior.
(Output from Processes): Remove caveat about ':stderr' forcing
'make-process' to use pipes.

* etc/NEWS: Announce this change (bug#56025).
2022-08-05 17:58:54 -07:00
..
em-alias.el
em-banner.el
em-basic.el Don't use 'eshell-convert' when all we want is a number 2022-03-29 16:50:48 +02:00
em-cmpl.el Remove many items obsolete since 24.1 2022-07-08 14:10:38 +02:00
em-dirs.el Ensure Eshell variable aliases properly handle indexing 2022-07-12 15:11:00 +02:00
em-elecslash.el New electric forward slash Eshell module 2022-04-21 11:57:12 -07:00
em-extpipe.el Rename recently added macro to follow conventions 2022-08-04 12:18:46 +02:00
em-glob.el Make Eshell globs ending in "/" match directories only 2022-06-26 16:52:38 +02:00
em-hist.el Fix some quoting problems in defcustom :type 2022-05-10 18:33:14 +02:00
em-ls.el Account for remapped faces in $COLUMNS and $LINES in Eshell 2022-06-09 10:08:15 +03:00
em-pred.el Optionally signal an error if an Eshell predicate fails to match anything 2022-06-26 16:51:21 +02:00
em-prompt.el
em-rebind.el When executing an Eshell pipeline, send input to the first process 2022-02-03 20:02:22 +01:00
em-script.el
em-smart.el
em-term.el * lisp/eshell/em-term.el (eshell-visual-commands): Add vim. 2022-06-30 15:03:46 +02:00
em-tramp.el Make usage of su and sudo consistent in eshell (bug#53783) 2022-02-06 09:43:13 +01:00
em-unix.el Rename nil-blank-string to eshell-nil-blank-string 2022-08-04 09:55:13 +02:00
em-xtra.el
esh-arg.el Fix quoting of #' in some doc strings 2022-08-03 13:14:32 +02:00
esh-cmd.el Reset 'eshell-in-pipeline-p' when interpolating commands 2022-05-25 14:13:07 +02:00
esh-ext.el Fix eshell-explicit-command-char doc string typo 2022-03-25 19:02:04 +01:00
esh-io.el When closing an Eshell process target, send EOF three times 2022-06-26 18:27:20 +02:00
esh-mode.el Make some defcustom types more restrictive 2022-07-05 18:33:29 +02:00
esh-module.el
esh-opt.el ; Fix typos 2022-05-15 11:15:06 +02:00
esh-proc.el Allow creating processes where only one of stdin or stdout is a PTY 2022-08-05 17:58:54 -07:00
esh-util.el Remove many items obsolete since 24.1 2022-07-08 14:10:38 +02:00
esh-var.el Update eshell-variable-aliases-list defcustom type 2022-07-16 14:05:44 +02:00
eshell.el When executing an Eshell pipeline, send input to the first process 2022-02-03 20:02:22 +01:00