|
From: | Dmitry Gutov |
Subject: | bug#13475: 24.2.91; accept-process-output hangs emacs on killed sub-process |
Date: | Fri, 4 Oct 2019 17:49:56 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 03.10.2019 20:24, Lars Ingebrigtsen wrote:
I'm don't think this is a bug -- as you say, if PROC is dead, then we just heed the timeout, so in a loop like this, you should check whether PROC is alive before calling `accept-process-output'. So I'm closing this bug report. I somebody things that Emacs should be changed to make accept-process-output to return immediately (with a non-nil return value?) if PROC is dead, please reopen.
Shouldn't we consider the "connection" to be "closed" if the process is dead? From the docstring:
Return non-nil if we received any output from PROCESS (or, if PROCESS is nil, from any process) before the timeout expired or the corresponding connection was closed.That might also imply that the function should return right away. But the example should work correctly even if it waits the required number of seconds and then returns non-nil.
[Prev in Thread] | Current Thread | [Next in Thread] |