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: Wed, 16 Jan 2019 14:07:12 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> So how can the code tell when it has read all the data?
> The code keeps calling accept-process-output until it gets nil.

You mean without a timeout, right?
With a timeout a value of nil doesn't guarantee you've had all the
data (if the process is still live).

I think we should make sure that

    (if (not (process-live-p p))
        (progn
          (accept-process-output p)
          ;; Here we should be sure that we processed all the output

whereas IIUC currently we need

    (if (not (process-live-p p))
        (progn
          (while (accept-process-output p))
          ;; Here we are presumably sure that we processed all the output

Right?


        Stefan




reply via email to

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