emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs | Pipeline #8399 has failed for master | ee0e259e


From: Philipp Stephani
Subject: Re: emacs | Pipeline #8399 has failed for master | ee0e259e
Date: Sun, 17 Jan 2021 11:37:02 +0100

Am Mi., 6. Jan. 2021 um 13:15 Uhr schrieb Michael Albinus
<michael.albinus@gmx.de>:
>
> Philipp Stephani <p.stephani2@gmail.com> writes:
>
> Hi Philipp,
>
> >> >> process-test-sentinel-wait-function-working-p which is used by
> >> >> process-test-sentinel-sit-for looks racy. Just because the process
> >> >> sentinel has been called is no guarantee that the process has exited
> >> >> and had its process-status set correctly, perhaps it should loop on
> >> >> 'process-live-p'
> >> >
> >> > AFAIK the only correct way to wait for a process to exit is (while
> >> > (accept-process-output PROC)).
> >>
> >> I vaguely remember that Stefan did propose (while (accept-process-output
> >> PROC 0)).
> >
> > I guess that would work as well, but wouldn't it result in a busy
> > wait?
>
> No. If there's no output, or the connection is closed, it shall return nil.
> Well, this is also true for (while (accept-process-output PROC)), but
> this could block if the process just waits for something to happen.

You're right in that (while (accept-process-output PROC 0)) doesn't
result in a busy wait, yes. However, since accept-process-output
returns nil in that case, it wouldn't wait at all. But these tests
(e.g. process-tests-stderr-filter) are clearly intended to wait for
process exit; they even contain assertions that the process has
exited.
I'm still convinced that (while (accept-process-output PROC)) is the
only correct way to wait for PROC to finish (see the "Accepting
Output" Info node).

> (OTOH we have wrapped now the tests with a 60 second timeout; this might
> be sufficient.)

We should never hit a timeout in these cases. These test processes
should exit immediately and never hang. Any timeout indicates a bug
either in the tests or in Emacs itself.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]