Function: eshell/wait

eshell/wait is a byte-compiled function defined in esh-proc.el.gz.

Signature

(eshell/wait &rest ARGS)

Documentation

Wait until processes have completed execution.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/esh-proc.el.gz
(defun eshell/wait (&rest args)
  "Wait until processes have completed execution."
  (eshell-eval-using-options
   "wait" args
   '((?h "help" nil nil "show this usage screen")
     (?t "timeout" t timeout "timeout in seconds")
     :preserve-args
     :show-usage
     :usage "[OPTION] PROCESS...
Wait until PROCESS(es) have completed execution.")
   (when (stringp timeout)
     (setq timeout (string-to-number timeout)))
   (dolist (arg args)
     (unless (or (processp arg) (natnump arg))
       (error "wait: invalid argument type: %s" (type-of arg))))
   (unless (eshell-wait-for-processes args timeout)
     (error "wait: timed out after %s seconds" timeout))))