Permalink
Browse files

* helm.el (helm-kill-async-process): Stop output instead of brutally …

…removing filter.

(helm-kill-async-processes): Use a while loop.
  • Loading branch information...
1 parent 84d10e6 commit 74bbd436e5fe7c71e883cd2c98a78a1ad3044ce5 @thierryvolpiatto thierryvolpiatto committed Oct 10, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 helm.el
View
13 helm.el
@@ -2292,13 +2292,14 @@ STRING is the output of PROCESS."
(helm-maybe-update-keymap))))
(defun helm-kill-async-processes ()
- "Kill all known asynchronous processes of `helm-async-processes'."
- (mapc 'helm-kill-async-process (mapcar 'car helm-async-processes))
- (setq helm-async-processes nil))
-
+ "Kill all asynchronous processes registered in `helm-async-processes'."
+ (while helm-async-processes
+ (helm-kill-async-process (caar helm-async-processes))
+ (setq helm-async-processes (cdr helm-async-processes))))
+
(defun helm-kill-async-process (process)
- "Kill PROCESS and detach the associated functions."
- (set-process-filter process nil)
+ "Stop output from `helm-output-filter' and kill associated PROCESS."
+ (set-process-filter process t)
(delete-process process))

0 comments on commit 74bbd43

Please sign in to comment.