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: Eli Zaretskii
Subject: Re: wait_reading_process_ouput hangs in certain cases (w/ patches)
Date: Mon, 13 Nov 2017 18:00:40 +0200

> Cc: address@hidden, address@hidden
> From: Paul Eggert <address@hidden>
> Date: Sun, 12 Nov 2017 21:27:05 -0800
> 
> >>> +          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

I explained that as well.  In a nutshell, I see no reason to consider
our commentary the definitive documentation of what the code does.  It
is much more probable that either the commentary was never accurate,
or it was once, but the code was modified without updating the
comments.  IME with Emacs sources, code reading is a much more
reliable way of figuring out what a function does than relying on its
commentary.

> 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.

I'm okay with that, but it looks like an stylistic issue, so I
wouldn't insist on that.



reply via email to

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