mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
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:
@ -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)
|
||||||
|
Reference in New Issue
Block a user