Pet*_*r.O 2 emacs elisp process
我需要在我的 emacs 术语中检查进程是否仍在运行;开始通过(term "/bin/bsh"),然后重命名为,例如。term-A.
我试过(term-check-proc "term-A"),但它没有显示我需要什么,或者至少,我不知道如何使用它。
ps afx如果有多个emacs term活动并运行相同的程序,试图通过 shell 调用(或类似的)来追踪它是有问题的(在我的情况下,这很有可能)......
我真的需要知道,如果一个进程在特定的Emacs长期缓冲,term-A,正在运行或不。
您可以使用以下命令获取缓冲区的进程get-buffer-process:
(get-buffer-process "*shell*") -> #<process shell>
(get-buffer-process "*scratch*") -> nil
Run Code Online (Sandbox Code Playgroud)
在我退出 shell 之后*shell*,我也得到nil了那个缓冲区。