branch: externals/el-job
commit ec7bc34d5667f43208e10cc007a526934193b2fd
Author: Martin Edström <[email protected]>
Commit: Martin Edström <[email protected]>

    Prevent el-job-ng-kill from running the sentinel again
    
    Does not matter much since we already handle it in the sentinel,
    but could feasibly prevent cases of printing a message N-cores times
    instead of once.
---
 el-job-ng.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/el-job-ng.el b/el-job-ng.el
index 4a9ac56464..dcd2d388ec 100644
--- a/el-job-ng.el
+++ b/el-job-ng.el
@@ -444,6 +444,7 @@ ID, MAX-SECS and MESSAGE as in `el-job-ng-await'."
 (defun el-job-ng-kill (id)
   "Kill processes for job ID and their buffers."
   (dolist (proc (el-job-ng-processes id))
+    (set-process-sentinel proc #'ignore)
     (let ((buf (process-buffer proc)))
       (if (buffer-live-p buf)
           (kill-buffer buf)
@@ -455,6 +456,7 @@ ID, MAX-SECS and MESSAGE as in `el-job-ng-await'."
 (defun el-job-ng-kill-keep-bufs (id)
   "Kill processes for job ID."
   (dolist (proc (el-job-ng-processes id))
+    (set-process-sentinel proc #'ignore)
     (delete-process proc)))
 
 (defun el-job-ng-stderr (id)

Reply via email to