[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: A question on wait_reading_process_output
From: |
Herbert Euler |
Subject: |
RE: A question on wait_reading_process_output |
Date: |
Fri, 30 May 2008 09:27:55 +0800 |
>> 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?
Based on the fact I see, yes. In fact I prefer changing
got_some_input outside the inner reading loop, like this:
Regards,
Guanpeng Xu
Index: process.c
===================================================================
RCS file: /sources/emacs/emacs/src/process.c,v
retrieving revision 1.542
diff -c -F '^[_a-zA-Z0-9$]+ *(' -r1.542 process.c
*** process.c 22 May 2008 14:53:26 -0000 1.542
--- process.c 30 May 2008 01:24:24 -0000
*************** wait_reading_process_output (time_limit,
*** 4489,4494 ****
--- 4489,4495 ----
break;
#endif
}
+ got_some_input = total_nread> 0 ? 1 : 0;
if (total_nread> 0 && do_display)
redisplay_preserve_echo_area (10);
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces.
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us