Mu4e: Confirm that lockfile pid is an emacs proc
Or else another app can be given the same PID and we'll be complaining another Emacs process is using mu4e when that simply isn't true.
This commit is contained in:
parent
abe2ac28c0
commit
a4db56be2f
1 changed files with 2 additions and 1 deletions
|
@ -20,7 +20,8 @@
|
||||||
(insert-file-contents +mu4e-lock-file)
|
(insert-file-contents +mu4e-lock-file)
|
||||||
(buffer-string))))
|
(buffer-string))))
|
||||||
(process (process-attributes pid)))
|
(process (process-attributes pid)))
|
||||||
(if process (cons pid process)
|
(if (and process (string-match-p "emacs" (alist-get 'args process)))
|
||||||
|
(cons pid process)
|
||||||
(delete-file +mu4e-lock-file) nil))))
|
(delete-file +mu4e-lock-file) nil))))
|
||||||
|
|
||||||
(defun +mu4e-lock-available (&optional strict)
|
(defun +mu4e-lock-available (&optional strict)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue