unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Herbert Euler <herberteuler@hotmail.com>
To: <emacs-devel@gnu.org>
Subject: A question on wait_reading_process_output
Date: Wed, 28 May 2008 11:39:44 +0800	[thread overview]
Message-ID: <BAY143-W1045A367F03DC7FF47CDD9DABC0@phx.gbl> (raw)


I have a question on this function, more precisely, line 4460 through
4496 in process.c.  The following predicates shows how that code would
be entered:

      if (wait_proc
	  && ! EQ (wait_proc->status, Qrun)
	  && ! EQ (wait_proc->status, Qconnect))

That is, when wait_proc is not running anymore.  The output from
wait_proc is read in the body of the if, and after that, the last
statement, break, causes the execution quiting from the outmost loop.
The value of got_some_input becomes the value of the calling to
wait_reading_process_output after the quiting.

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.

It's hard to produce such a case to reveal this case, so it remains my
guess.  Perhaps I missed something, but is my guess right?  Thanks in
advance.

Regards,
Guanpeng Xu
_________________________________________________________________
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




             reply	other threads:[~2008-05-28  3:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28  3:39 Herbert Euler [this message]
2008-05-29 14:57 ` A question on wait_reading_process_output Stefan Monnier
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=BAY143-W1045A367F03DC7FF47CDD9DABC0@phx.gbl \
    --to=herberteuler@hotmail.com \
    --cc=emacs-devel@gnu.org \
    /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).