[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master b4f504a0ea: Load desktop without prompting if process is dead
From: |
Eli Zaretskii |
Subject: |
Re: master b4f504a0ea: Load desktop without prompting if process is dead |
Date: |
Thu, 24 Mar 2022 16:50:26 +0200 |
> +(defun desktop--emacs-pid-running-p (pid)
> + "Return t if an Emacs process with PID exists."
> + (when-let ((attr (process-attributes pid)))
> + (equal (alist-get 'comm attr)
> + (file-name-nondirectory (car command-line-args)))))
This assumes that command-line-args resolves symlinks in the Emacs
program's name? Or that the 'comm' attribute in process-attributes
does NOT resolve symlinks? Because otherwise the above will cause
false negatives. And on Windows, there's the issue of the ".exe"
extension, which could be in one, but not the other, I think?
- Re: master b4f504a0ea: Load desktop without prompting if process is dead,
Eli Zaretskii <=