]> code.delx.au - gnu-emacs/blobdiff - src/process.c
*** empty log message ***
[gnu-emacs] / src / process.c
index 3cb63de1584400a0cd9f1101007ccac9cc33bfe9..0db0638f85d7ba680fd43842d1547a1c6648c8bf 100644 (file)
@@ -1,6 +1,6 @@
 /* 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.
 
@@ -4080,6 +4080,10 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
         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)))
@@ -4258,7 +4262,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
          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,
@@ -4296,7 +4300,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
                  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))
@@ -4771,7 +4775,7 @@ read_process_output (proc, channel)
       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)
                {
@@ -4780,7 +4784,7 @@ read_process_output (proc, channel)
                  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)
@@ -6090,7 +6094,10 @@ kill_buffer_processes (buffer)
    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)
@@ -6208,18 +6215,7 @@ 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.  */