/* Asynchronous subprocess control for GNU Emacs.
Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 96, 98, 1999,
- 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Emacs.
Otherwise, do pending quit if requested. */
if (XINT (read_kbd) >= 0)
QUIT;
+#ifdef SYNC_INPUT
+ else if (interrupt_input_pending)
+ handle_async_input ();
+#endif
/* Exit now if the cell we're waiting for became non-nil. */
if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell)))
else
Available = input_wait_mask;
check_connect = (num_pending_connects > 0);
- check_delay = process_output_delay_count;
+ check_delay = wait_channel >= 0 ? 0 : process_output_delay_count;
}
/* If frame size has changed or the window is newly mapped,
proc = chan_process[channel];
if (NILP (proc))
continue;
- if (XPROCESS (proc)->read_output_delay > 0)
+ if (XINT (XPROCESS (proc)->read_output_delay) > 0)
{
check_delay--;
if (NILP (XPROCESS (proc)->read_output_skip))
if (!NILP (p->adaptive_read_buffering))
{
int delay = XINT (p->read_output_delay);
- if (nbytes < readmax - carryover)
+ if (nbytes < 256)
{
if (delay < READ_OUTPUT_DELAY_MAX_MAX)
{
delay += READ_OUTPUT_DELAY_INCREMENT * 2;
}
}
- else if (delay > 0)
+ else if (delay > 0 && (nbytes == readmax - carryover))
{
delay -= READ_OUTPUT_DELAY_INCREMENT;
if (delay == 0)
queued and the signal-catching function will be continually
reentered until the queue is empty". Invoking signal() causes the
kernel to reexamine the SIGCLD queue. Fred Fish, UniSoft Systems
- Inc. */
+ Inc.
+
+ ** Malloc WARNING: This should never call malloc either directly or
+ indirectly; if it does, that is a bug */
SIGTYPE
sigchld_handler (signo)
if (WIFEXITED (w))
synch_process_retcode = WRETCODE (w);
else if (WIFSIGNALED (w))
- {
- int code = WTERMSIG (w);
- char *signame;
-
- synchronize_system_messages_locale ();
- signame = strsignal (code);
-
- if (signame == 0)
- signame = "unknown";
-
- synch_process_death = signame;
- }
+ synch_process_termsig = WTERMSIG (w);
/* Tell wait_reading_process_input that it needs to wake up and
look around. */