#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 <ssdef.h>
#include <iodef.h>
#include <clidef.h>
{
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));
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;
{
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);
}
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
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);
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
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 */