emacs-devel
[Top][All Lists]
Advanced

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

Re: wait_reading_process_ouput hangs in certain cases (w/ patches)


From: Paul Eggert
Subject: Re: wait_reading_process_ouput hangs in certain cases (w/ patches)
Date: Sun, 12 Nov 2017 21:27:05 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

Eli Zaretskii wrote:
+          if (wait_proc
+              && wait_proc->infd_num_bytes_read != 
initial_wait_proc_num_bytes_read)
+            got_some_output = 1;
Similarly for the other change that assigns to got_some_output.
You can read up-thread why I'm firmly against doing that.

It doesn't explain why you're so firm about it since the commentary clearly states that 1 is OK, but at any rate one could use this instead:

  if (wait_proc)
    {
      unsigned int diff = (wait_proc->infd_num_bytes_read
                           - initial_wait_proc_num_bytes_read);
      if (diff != 0)
        got_some_output = diff;
    }

which is still a bit simpler than what was proposed. Anyway there's no need to refer to ISO/IEC 9899:1999 chapter and verse here, any more than there's a need to refer to it in the countless other places that we rely on it.



reply via email to

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