Subject: bug#33839: 26.1.90; Emacs occasionally fails to receive asynchronous subprocess output in batch mode

From: Eli Zaretskii <[email-masked]>
Date: Tue, 25 Dec 2018 19:28:22 +0200

> From: Philipp Stephani <[email-masked]>
> Date: Tue, 25 Dec 2018 17:41:17 +0100
> Cc: [email-masked]
> 
> > What happens if you do that unconditionally?
> 
> You mean, without a while loop? It works in this specific case, but
> doesn't work in other cases, e.g. when a timer runs while the process
> is still running.
> To make this work reliably, a loop is required because there's no
> guarantee that accept-process-output returns only when the process has
> finished.

What I meant was that this condition "refuses" to take output from the
subprocess if it has exited.  I'm questioning the correctness of this,
since it could well be that the last portion of that output is still
buffered somewhere, even though we already got SIGCHLD.

I'm not sure I understand the example with a timer, but if in that
situation your program is willing to accept output even after the
subprocess already exited, does it work correctly then?