aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorJim Porter2022-07-17 20:25:00 -0700
committerJim Porter2022-08-05 17:58:54 -0700
commitd7b89ea4077d4fe677ba0577245328819ee79cdc (patch)
treed4e499042bdf2f301be7f2d7ec05f0d1bfd8d44b /etc
parentb70369c557efed3dcd86dc64a2e73e3480dea6af (diff)
downloademacs-d7b89ea4077d4fe677ba0577245328819ee79cdc.tar.gz
emacs-d7b89ea4077d4fe677ba0577245328819ee79cdc.zip
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).
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index dc8bd6ce24b..8a9744ab3e2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2332,6 +2332,12 @@ they will still be escaped, so the '.foo' symbol is still printed as
2332and remapping parent of basic faces does not work reliably. 2332and remapping parent of basic faces does not work reliably.
2333Instead of remapping 'mode-line', you have to remap 'mode-line-active'. 2333Instead of remapping 'mode-line', you have to remap 'mode-line-active'.
2334 2334
2335+++
2336** 'make-process' has been extended to support ptys when ':stderr' is set.
2337Previously, setting ':stderr' to a non-nil value would force the
2338process's connection to use pipes. Now, Emacs will use a pty for
2339stdin and stdout if requested no matter the value of ':stderr'.
2340
2335--- 2341---
2336** User option 'mail-source-ignore-errors' is now obsolete. 2342** User option 'mail-source-ignore-errors' is now obsolete.
2337The whole mechanism for prompting users to continue in case of 2343The whole mechanism for prompting users to continue in case of
@@ -3324,6 +3330,12 @@ This is useful when quoting shell arguments for a remote shell
3324invocation. Such shells are POSIX conformant by default. 3330invocation. Such shells are POSIX conformant by default.
3325 3331
3326+++ 3332+++
3333** 'make-process' can set connection type independently for input and output.
3334When calling 'make-process', communication via pty can be enabled
3335selectively for just input or output by passing a cons cell for
3336':connection-type', e.g. '(pipe . pty)'.
3337
3338+++
3327** 'signal-process' now consults the list 'signal-process-functions'. 3339** 'signal-process' now consults the list 'signal-process-functions'.
3328This is to determine which function has to be called in order to 3340This is to determine which function has to be called in order to
3329deliver the signal. This allows Tramp to send the signal to remote 3341deliver the signal. This allows Tramp to send the signal to remote