unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* A question on wait_reading_process_output
@ 2008-05-28  3:39 Herbert Euler
  2008-05-29 14:57 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Herbert Euler @ 2008-05-28  3:39 UTC (permalink / raw)
  To: emacs-devel


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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-30  3:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-05-30  2:15     ` Stefan Monnier
2008-05-30  3:09       ` Herbert Euler

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).