Timeline for kill-process doesn't kill process
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 25, 2017 at 14:01 | comment | added | Basil |
Sorry, I did not see your updated answer. The fact that get-buffer-process does not return nil is indeed the why , but I'm against referring to the use of sit-for as a solution . It merely points towards where the issue lies. A person facing this problem in their program would not solve it with sit-for ; they would either avoid this situation altogether or do something like wvxvw suggests. I suggest you reword your answer to suggest sit-for as a means of clarifying what's happening, and not as a solution.
|
|
May 25, 2017 at 13:48 | comment | added | jue | The explanation of wvxvw looks reasonable. | |
May 25, 2017 at 13:40 | comment | added | jue | 1. Why is the solution to use 'sit-for' wrong? 2. The questioner asked why is the sexp hanging, so the reason is 'get-buffer-process is not returning nil', I edited my answer. | |
May 25, 2017 at 13:31 | history | edited | jue | CC BY-SA 3.0 |
typo
|
May 25, 2017 at 13:27 | comment | added | Basil |
Sure, but it seems to me that in your answer both the "why" (get-buffer-process returns nil ) and the "solution" (using sit-for ) are wrong. What am I missing?
|
|
May 25, 2017 at 13:19 | comment | added | jue | Basil, yes it looks like 'get-buffer-process' does not return nil with your code, even when counting to 1M. My second Solution is working completely without 'get-buffer-process' But the questioneer asked 'why' not for a solution. :) | |
May 25, 2017 at 12:42 | comment | added | Basil |
In my case get-buffer-process never returns nil within a loop that doesn't call sit-for . Try it yourself: (progn (start-process "p" "b" "cat") (dotimes (i 10) (message "> %s" (get-buffer-process "b")) (kill-process "p"))) .
|
|
May 25, 2017 at 10:33 | history | edited | jue | CC BY-SA 3.0 |
explanation now correct and it looks nicer
|
May 25, 2017 at 10:24 | history | edited | jue | CC BY-SA 3.0 |
added 88 characters in body
|
May 25, 2017 at 10:19 | history | undeleted | jue | ||
May 25, 2017 at 10:17 | history | deleted | jue | via Vote | |
May 25, 2017 at 10:16 | history | answered | jue | CC BY-SA 3.0 |