emacs-devel
[Top][All Lists]
Advanced

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

Re: some accept-process-output races fixed; Tramp FIXMEs


From: Stefan Monnier
Subject: Re: some accept-process-output races fixed; Tramp FIXMEs
Date: Tue, 22 Jan 2019 17:06:40 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> IIRC, the timeout is used because accept-process-output could be blocked
> otherwise. Tramp has often the need to check whether there is still
> output from the process, and the timeout is the only way I know that
> accept-process-output returns in finite time.

The time out makes sense when you have *other* things to do (so you're
just polling, making sure those other things don't prevent Emacs from
processing the process/connection's output in a timely fashion).

> If we could guarantee that (accept-process-output p) returns when
> either output has arrived and or the process has finished, I could
> change the code.

This has been the promise of the docstring "for ever", AFAIK.
Which means that if you have nothing else to do until the process dies,
then you're better off using nil for the timeout.
I don't know if that promise was broken by bugs in the code, OTOH.


        Stefan



reply via email to

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