aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorGlenn Morris2008-11-23 03:05:51 +0000
committerGlenn Morris2008-11-23 03:05:51 +0000
commit403e4dc9896abde019ebb48c0303de5c9e1c44e6 (patch)
tree80f8afde5dc208d4b05a21442084e8c34c48d906 /lisp/eshell
parent5101a9dc47c9dfbe0326c4f6501139b514261b42 (diff)
downloademacs-403e4dc9896abde019ebb48c0303de5c9e1c44e6.tar.gz
emacs-403e4dc9896abde019ebb48c0303de5c9e1c44e6.zip
(eshell-gather-process-output):
Set process-connection-type nil for all but the first element of a pipeline. (Bug#1388)
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/esh-proc.el26
1 files changed, 21 insertions, 5 deletions
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 25d9dd64663..39fea83cd8d 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -250,11 +250,27 @@ Used only on systems which do not support async subprocesses.")
250 (cond 250 (cond
251 ((fboundp 'start-process) 251 ((fboundp 'start-process)
252 (setq proc 252 (setq proc
253 (apply 'start-process 253 ;; Bug#1388. Some commands (eg bc) check isatty to decide
254 (file-name-nondirectory command) nil 254 ;; whether they are being called interactively.
255 ;; `start-process' can't deal with relative 255 ;; A normal shell pipeline has:
256 ;; filenames 256 ;; first: stdin tty , stdout pipe
257 (append (list (expand-file-name command)) args))) 257 ;; rest : stdin pipe, stdout pipe
258 ;; last : stdin pipe, stdout tty
259 ;; We have:
260 ;; first: stdin tty , stdout tty
261 ;; last : stdin pipe, stdout pipe
262 ;; In other words, the first and last elements have the
263 ;; wrong kind of stdout. (Perhaps this does not matter much...)
264 ;; FIXME which is better for the first element:
265 ;; tty/tty (as now), or pipe/pipe?
266 (let ((process-connection-type
267 (unless (and eshell-in-pipeline-p
268 (not (eq eshell-in-pipeline-p 'first)))
269 process-connection-type)))
270 (apply 'start-process
271 (file-name-nondirectory command) nil
272 ;; `start-process' can't deal with relative filenames
273 (append (list (expand-file-name command)) args))))
258 (eshell-record-process-object proc) 274 (eshell-record-process-object proc)
259 (set-process-buffer proc (current-buffer)) 275 (set-process-buffer proc (current-buffer))
260 (if (eshell-interactive-output-p) 276 (if (eshell-interactive-output-p)