all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Does this code (in wait_reading_process_input) work?
@ 2002-02-18 22:06 Kim F. Storm
  2002-02-19 21:32 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Kim F. Storm @ 2002-02-18 22:06 UTC (permalink / raw)


Does the following code in wait_reading_process_input really work
as intended (ie. wait for output from a specific process) ?

      /* Don't wait for output from a non-running process.  */
      if (wait_proc != 0 && !NILP (wait_proc->raw_status_low))
	update_status (wait_proc);
      if (wait_proc != 0
	  && ! EQ (wait_proc->status, Qrun))
	{
	  int nread, total_nread = 0;
          ...


As I read the code, it only enters the the conditional block if the
process state *differs* from 'run - i.e. when it is non-running.
That's the opposite of what the comment above the test says.

So what's up?  

++kfs


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

* Re: Does this code (in wait_reading_process_input) work?
  2002-02-18 22:06 Does this code (in wait_reading_process_input) work? Kim F. Storm
@ 2002-02-19 21:32 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2002-02-19 21:32 UTC (permalink / raw)
  Cc: emacs-devel

	  /* Don't wait for output from a non-running process.  */
	  if (wait_proc != 0 && !NILP (wait_proc->raw_status_low))
	    update_status (wait_proc);
	  if (wait_proc != 0
	      && ! EQ (wait_proc->status, Qrun))
	    {
	      int nread, total_nread = 0;
	      ...


    As I read the code, it only enters the the conditional block if the
    process state *differs* from 'run - i.e. when it is non-running.

That is correct.

    That's the opposite of what the comment above the test says.

That code reads output but does not wait for it.  In fact, it ends
with `break;' which exits the main loop of wait_reading_process_input.
So the comment seems correct to me.

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

end of thread, other threads:[~2002-02-19 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-18 22:06 Does this code (in wait_reading_process_input) work? Kim F. Storm
2002-02-19 21:32 ` Richard Stallman

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.