2

If I start a long-running process in an emacs shell create by (shell), the shell will be busy for a while. How can I detect that programmatically (i.e., using elisp)?

I tried: get the process by (get-process "shell") and test (process-live-p proc), but it always return t.

AhLeung
  • 1,083
  • 5
  • 14

1 Answers1

2
(defun shell-process-running-child-p (process-name)
  (interactive)
  (if (process-running-child-p process-name)
      (print t)
    (print nil)))
bertfred
  • 1,729
  • 1
  • 12
  • 24