[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Detecting a running process in Elisp
From: |
Drew Adams |
Subject: |
RE: Detecting a running process in Elisp |
Date: |
Fri, 26 Jul 2013 08:50:35 -0700 (PDT) |
> I have a process "ScidvsMac" which I'd like to detect in
> Elisp. I'm currently using
> (search "ScidvsMac" (shell-command-to-string "ps -A"))
> but is there something cleaner?
Without knowing anything about processes in Elisp, I tried
using apropos "processes" (apropos "process" had too many hits).
That led me to `list-processes', which led me to `list-processes--refresh'.
That led me to `process-list', which I imagine you can use to get
what you want. Each element of `process-list' is supposedly a
process object (the doc is not terrific for `process-list'), which
means you can use functions such as `process-buffer', `process-name',
`process-type', `process-status', and `process-attributes' on it.
HTH. Remember: `apropos' and its friends are your friends.
Message not available
Re: Detecting a running process in Elisp, gentsquash, 2013/07/26