]> code.delx.au - gnu-emacs/blobdiff - src/process.c
* xterm.c (XTread_socket): Turn off ControlMask for XLookupString.
[gnu-emacs] / src / process.c
index 1e537f736c2bc2e33c96a1d041dcc7347de1ba83..f383c95511af0a850c95691c5e08900d3c598001 100644 (file)
@@ -359,7 +359,7 @@ status_message (status)
     {
       if (code == 0)
        return build_string ("finished\n");
-      string = Fint_to_string (make_number (code));
+      string = Fnumber_to_string (make_number (code));
       string2 = build_string (coredump ? " (core dumped)\n" : "\n");
       return concat2 (build_string ("exited abnormally with code "),
                      concat2 (string, string2));
@@ -1034,7 +1034,7 @@ Remaining arguments are strings to give program as arguments.")
   if (new_argv[0][0] != '/')
     {
       tem = Qnil;
-      openp (Vexec_path, program, "", &tem, 1);
+      openp (Vexec_path, program, EXEC_SUFFIXES, &tem, 1);
       if (NILP (tem))
        report_file_error ("Searching for program", Fcons (program, Qnil));
       new_argv[0] = XSTRING (tem)->data;
@@ -1747,15 +1747,6 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
          EMACS_SET_SECS_USECS (timeout, 100000, 0);
        }
 
-      /* Cause C-g and alarm signals to take immediate action,
-        and cause input available signals to zero out timeout.
-
-        It is important that we do this before checking for process
-        activity.  If we get a SIGCHLD after the explicit checks for
-        process activity, timeout is the only way we will know.  */
-      if (XINT (read_kbd) < 0)
-       set_waiting_for_input (&timeout);
-
       /* If status of something has changed, and no input is
         available, notify the user of the change right away.  After
         this explicit check, we'll let the SIGCHLD handler zap
@@ -1768,6 +1759,15 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
            status_notify ();
        }
 
+      /* Cause C-g and alarm signals to take immediate action,
+        and cause input available signals to zero out timeout.
+
+        It is important that we do this before checking for process
+        activity.  If we get a SIGCHLD after the explicit checks for
+        process activity, timeout is the only way we will know.  */
+      if (XINT (read_kbd) < 0)
+       set_waiting_for_input (&timeout);
+
       /* Don't wait for output from a non-running process.  */
       if (wait_proc != 0 && !NILP (wait_proc->raw_status_low))
        update_status (wait_proc);
@@ -1841,9 +1841,15 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
          else
            error("select error: %s", sys_errlist[xerrno]);
        }
-#ifdef sun
+#if defined(sun) && !defined(USG5_4)
       else if (nfds > 0 && FD_ISSET (0, &Available) && interrupt_input)
-       /* System sometimes fails to deliver SIGIO.  */
+       /* System sometimes fails to deliver SIGIO.
+
+          David J. Mackenzie says that Emacs doesn't compile under
+          Solaris if this code is enabled, thus the USG5_4 in the CPP
+          conditional.  "I haven't noticed any ill effects so far.
+          If you find a Solaris expert somewhere, they might know
+          better." */
        kill (getpid (), SIGIO);
 #endif
 
@@ -2597,7 +2603,7 @@ nil, indicating the current buffer's process.")
   else
     {
       close (XPROCESS (proc)->outfd);
-      XFASTINT (XPROCESS (proc)->outfd) = open ("/dev/null", O_WRONLY);
+      XFASTINT (XPROCESS (proc)->outfd) = open (NULL_DEVICE, O_WRONLY);
     }
 #endif /* VMS */
 #endif /* did not do TOICREMOTE */