Mercurial > emacs
diff src/callproc.c @ 2432:17a84e60603b
New macros NULL_DEVICE and EXEC_SUFFIXES, to give the name of the
equivalent of /dev/null, and the suffixes used by executable
files. This is simple, and helps people porting Emacs to other
operating systems.
* process.h (NULL_DEVICE): Give this a default value.
* process.c (Fstart_process): Pass EXEC_SUFFIXES to openp.
(Fprocess_send_eof): Use NULL_DEVICE instead of "/dev/null".
* callproc.c (Fcall_process): Pass EXEC_SUFFIXES to openp.
Use NULL_DEVICE instead of "/dev/null".
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Tue, 30 Mar 1993 23:05:56 +0000 |
parents | 7f66b40a0192 |
children | daaa78c8c980 |
line wrap: on
line diff
--- a/src/callproc.c Tue Mar 30 22:21:03 1993 +0000 +++ b/src/callproc.c Tue Mar 30 23:05:56 1993 +0000 @@ -151,11 +151,7 @@ CHECK_STRING (infile, 1); } else -#ifdef VMS - infile = build_string ("NLA0:"); -#else - infile = build_string ("/dev/null"); -#endif /* not VMS */ + infile = build_string (NULL_DEVICE); if (nargs >= 3) { @@ -220,7 +216,7 @@ report_file_error ("Opening process input file", Fcons (infile, Qnil)); } /* Search for program; barf if not found. */ - openp (Vexec_path, args[0], "", &path, 1); + openp (Vexec_path, args[0], EXEC_SUFFIXES, &path, 1); if (NILP (path)) { close (filefd); @@ -229,7 +225,7 @@ new_argv[0] = XSTRING (path)->data; if (XTYPE (buffer) == Lisp_Int) - fd[1] = open ("/dev/null", O_WRONLY), fd[0] = -1; + fd[1] = open (NULL_DEVICE, O_WRONLY), fd[0] = -1; else { pipe (fd);