help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: check if another emacs instance is running


From: Juanma Barranquero
Subject: Re: check if another emacs instance is running
Date: Sun, 29 Nov 2009 14:41:22 +0100

>  Use some external utility to list current processes e.g.
>  (when (< 1 (string-to-number
>              (shell-command-to-string "ps -A |grep -c emacs23")))
>    (message "ok"))
>  ;; but this is system-specific.

On Emacs 23, you can use `list-system-processes' to obtain a list of
process PIDs, and `process-attributes' to get info for each one,
including the process name, etc.

    Juanma




reply via email to

[Prev in Thread] Current Thread [Next in Thread]