From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Herbert Euler <herberteuler@hotmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: A question on wait_reading_process_output
Date: Thu, 29 May 2008 10:57:00 -0400 [thread overview]
Message-ID: <jwvabi9durn.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <BAY143-W1045A367F03DC7FF47CDD9DABC0@phx.gbl> (Herbert Euler's message of "Wed, 28 May 2008 11:39:44 +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?
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;
next prev parent reply other threads:[~2008-05-29 14:57 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 [this message]
2008-05-30 1:27 ` Herbert Euler
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvabi9durn.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=herberteuler@hotmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).