X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/6e4f3667d971d0701064487e4c1e666351ddf9eb..42e3337cc7a782ab8705b1dea3841a7b0dcb6224:/src/process.c diff --git a/src/process.c b/src/process.c index a504669ebf..f383c95511 100644 --- a/src/process.c +++ b/src/process.c @@ -159,12 +159,14 @@ static Lisp_Object stream_process; #endif /* BSD or UNIPLUS or STRIDE */ #endif /* no WAITTYPE */ #else /* VMS */ - -/* For the CMU PTY driver + */ -#define DCL_PROMPT "$ " -/* This is a hack. I have no idea what needs to go here, but this */ -/* will get it to compile. We can fix it later. rbr */ #define WAITTYPE int +#define WIFSTOPPED(w) 0 +#define WIFSIGNALED(w) 0 +#define WIFEXITED(w) ((w) != -1) +#define WRETCODE(w) (w) +#define WSTOPSIG(w) (w) +#define WCOREDUMP(w) 0 +#define WTERMSIG(w) (w) #include #include #include @@ -357,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)); @@ -1032,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; @@ -1527,7 +1529,7 @@ deactivate_process (proc) { VMS_PROC_STUFF *get_vms_process_pointer (), *vs; sys$dassgn (outchannel); - vs = get_vms_process_pointer (p->pid) + vs = get_vms_process_pointer (p->pid); if (vs) give_back_vms_process_stuff (vs); } @@ -1745,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 @@ -1766,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); @@ -1839,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 @@ -2595,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 */