aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-11-23 03:05:51 +0000
committerGlenn Morris2008-11-23 03:05:51 +0000
commit403e4dc9896abde019ebb48c0303de5c9e1c44e6 (patch)
tree80f8afde5dc208d4b05a21442084e8c34c48d906
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)
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/eshell/esh-proc.el26
2 files changed, 32 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a39021dce29..2f93e13e140 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
12008-11-23 Glenn Morris <rgm@gnu.org>
2
3 * eshell/esh-cmd.el (eshell-in-pipeline-p): Add doc-string.
4 (eshell-do-pipelines): Add optional argument to distinguish recursive
5 calls. Use to set eshell-in-pipeline-p to 'first for the first command
6 in a pipeline.
7
8 * eshell/esh-proc.el (eshell-gather-process-output):
9 Set process-connection-type nil for all but the first element of a
10 pipeline. (Bug#1388)
11
12008-11-22 Juri Linkov <juri@jurta.org> 122008-11-22 Juri Linkov <juri@jurta.org>
2 13
3 * dired-aux.el (dired-isearch-filenames): Add new context-dependent 14 * dired-aux.el (dired-isearch-filenames): Add new context-dependent
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)