int xerrno;
Lisp_Object proc;
struct timespec timeout, end_time;
- int got_some_input = -1;
+ int got_some_output = -1;
ptrdiff_t count = SPECPDL_INDEX ();
FD_ZERO (&Available);
break;
/* After reading input, vacuum up any leftovers without waiting. */
- if (0 <= got_some_input)
+ if (0 <= got_some_output)
nsecs = -1;
/* Compute time from now till when time limit is up. */
/* It's okay for us to do this and then continue with
the loop, since timeout has already been zeroed out. */
clear_waiting_for_input ();
- got_some_input = status_notify (NULL, wait_proc);
+ got_some_output = status_notify (NULL, wait_proc);
if (do_display) redisplay_preserve_echo_area (13);
}
}
}
else
{
- if (got_some_input < nread)
- got_some_input = nread;
+ if (got_some_output < nread)
+ got_some_output = nread;
if (nread == 0)
break;
read_some_bytes = true;
buffered-ahead character if we have one. */
nread = read_process_output (proc, channel);
- if ((!wait_proc || wait_proc == XPROCESS (proc)) && got_some_input < nread)
- got_some_input = nread;
+ if ((!wait_proc || wait_proc == XPROCESS (proc))
+ && got_some_output < nread)
+ got_some_output = nread;
if (nread > 0)
{
/* Since read_process_output can run a filter,
QUIT;
}
- return got_some_input;
+ return got_some_output;
}
\f
/* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS. */
Lisp_Object proc;
Lisp_Object tail, msg;
struct gcpro gcpro1, gcpro2;
- int got_some_input = -1;
+ int got_some_output = -1;
tail = Qnil;
msg = Qnil;
{
int nread = read_process_output (proc, p->infd);
if ((!wait_proc || wait_proc == XPROCESS (proc))
- && got_some_input < nread)
- got_some_input = nread;
+ && got_some_output < nread)
+ got_some_output = nread;
if (nread <= 0)
break;
}
update_mode_lines = 24; /* In case buffers use %s in mode-line-format. */
UNGCPRO;
- return got_some_input;
+ return got_some_output;
}
DEFUN ("internal-default-process-sentinel", Finternal_default_process_sentinel,