Function: eshell-create-handles
eshell-create-handles is a byte-compiled function defined in
esh-io.el.gz.
Signature
(eshell-create-handles STDOUT OUTPUT-MODE &optional STDERR ERROR-MODE)
Documentation
Create a new set of file handles for a command.
The default location for standard output and standard error will go to
STDOUT and STDERR, respectively.
OUTPUT-MODE and ERROR-MODE are either overwrite, append or insert;
a nil value of mode defaults to insert.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-io.el.gz
(defun eshell-create-handles
(stdout output-mode &optional stderr error-mode)
"Create a new set of file handles for a command.
The default location for standard output and standard error will go to
STDOUT and STDERR, respectively.
OUTPUT-MODE and ERROR-MODE are either `overwrite', `append' or `insert';
a nil value of mode defaults to `insert'."
(let ((handles (make-vector eshell-number-of-handles nil))
(output-target (eshell-get-target stdout output-mode))
(error-target (eshell-get-target stderr error-mode)))
(aset handles eshell-output-handle (cons output-target 1))
(aset handles eshell-error-handle
(cons (if stderr error-target output-target) 1))
handles))