Function: eshell-process-interact
eshell-process-interact is a byte-compiled function defined in
esh-proc.el.gz.
Signature
(eshell-process-interact FUNC &optional ALL QUERY)
Documentation
Interact with a process, using PROMPT if more than one, via FUNC.
If ALL is non-nil, background processes will be interacted with as well. If QUERY is non-nil, query the user with QUERY before calling FUNC.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-proc.el.gz
(defun eshell-process-interact (func &optional all query)
"Interact with a process, using PROMPT if more than one, via FUNC.
If ALL is non-nil, background processes will be interacted with as well.
If QUERY is non-nil, query the user with QUERY before calling FUNC."
(let (defunct result)
(dolist (entry eshell-process-list)
(if (and (process-live-p (car entry))
(or all
(not (cdr entry)))
(or (not query)
(y-or-n-p (format-message query
(process-name (car entry))))))
(setq result (funcall func (car entry))))
(unless (process-live-p (car entry))
(setq defunct (cons entry defunct))))
;; clean up the process list; this can get dirty if an error
;; occurred that brought the user into the debugger, and then they
;; quit, so that the sentinel was never called.
(dolist (d defunct)
(eshell-remove-process-entry d))
result))