emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A question on wait_reading_process_output


From: Herbert Euler
Subject: A question on wait_reading_process_output
Date: Wed, 28 May 2008 11:39:44 +0800

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 via email to

[Prev in Thread] Current Thread [Next in Thread]