branch: externals/dape
commit 9be8f206853000da268779dd88c6e25dc59ca4fd
Author: Daniel Pettersson <[email protected]>
Commit: Daniel Pettersson <[email protected]>

    Fix zombied REPL dummy processes
---
 dape.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dape.el b/dape.el
index 33836f1e17..a462a5a008 100644
--- a/dape.el
+++ b/dape.el
@@ -2493,7 +2493,9 @@ interactively or if SELECT-BUFFER is non nil."
   ;; Stolen from ielm
   ;; Start a dummy process just to please comint
   (unless (comint-check-proc (current-buffer))
-    (start-process "dape-repl" (current-buffer) nil)
+    (let ((process
+           (start-process "dape-repl" (current-buffer) nil)))
+      (add-hook 'kill-buffer-hook (lambda () (delete-process process)) nil t))
     (set-process-query-on-exit-flag (get-buffer-process (current-buffer))
                                     nil)
     (set-process-filter (get-buffer-process (current-buffer))

Reply via email to