[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A question on wait_reading_process_output
From: |
Stefan Monnier |
Subject: |
Re: A question on wait_reading_process_output |
Date: |
Thu, 29 May 2008 10:57:00 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
> There seems a problem here: The value of got_some_input isn't set to
> nonzero during the reading happens inside the body of the if even when
> something has been read, so it is possible that something has been
> read from wait_proc's output but got_some_input is still zero. In
> that case, the return value of wait_reading_process is not what it
> promises.
So you're proposing a patch like the onw below?
I guess that'd make sense. Does anybody see a problem with it?
Stefan
--- process.c.~1.542.~ 2008-05-22 17:12:27.000000000 -0400
+++ process.c 2008-05-29 10:55:25.000000000 -0400
@@ -4475,7 +4479,10 @@
break;
if (0 < nread)
+ {
total_nread += nread;
+ got_some_input = 1;
+ }
#ifdef EIO
else if (nread == -1 && EIO == errno)
break;