From: Herbert Euler <herberteuler@hotmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: RE: A question on wait_reading_process_output
Date: Fri, 30 May 2008 09:27:55 +0800 [thread overview]
Message-ID: <BAY143-W458C2EB9776A506D599F79DABE0@phx.gbl> (raw)
In-Reply-To: <jwvabi9durn.fsf-monnier+emacs@gnu.org>
>> 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
next prev parent reply other threads:[~2008-05-30 1:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-28 3:39 A question on wait_reading_process_output Herbert Euler
2008-05-29 14:57 ` Stefan Monnier
2008-05-30 1:27 ` Herbert Euler [this message]
2008-05-30 2:15 ` Stefan Monnier
2008-05-30 3:09 ` Herbert Euler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BAY143-W458C2EB9776A506D599F79DABE0@phx.gbl \
--to=herberteuler@hotmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.