aboutsummaryrefslogtreecommitdiffstats
path: root/src/callproc.c
diff options
context:
space:
mode:
authorJim Blandy1993-03-30 23:05:56 +0000
committerJim Blandy1993-03-30 23:05:56 +0000
commit5437e9f97e19ea0eba3288def1734e61a76ca3c7 (patch)
tree8be32212f7335e07c582f04c0d5ea016a328117e /src/callproc.c
parent9115e9389c75ae7f0da5743421aebb3977016e6d (diff)
downloademacs-5437e9f97e19ea0eba3288def1734e61a76ca3c7.tar.gz
emacs-5437e9f97e19ea0eba3288def1734e61a76ca3c7.zip
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".
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 4b674eb9946..72d2b8c6ddd 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -151,11 +151,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
151 CHECK_STRING (infile, 1); 151 CHECK_STRING (infile, 1);
152 } 152 }
153 else 153 else
154#ifdef VMS 154 infile = build_string (NULL_DEVICE);
155 infile = build_string ("NLA0:");
156#else
157 infile = build_string ("/dev/null");
158#endif /* not VMS */
159 155
160 if (nargs >= 3) 156 if (nargs >= 3)
161 { 157 {
@@ -220,7 +216,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
220 report_file_error ("Opening process input file", Fcons (infile, Qnil)); 216 report_file_error ("Opening process input file", Fcons (infile, Qnil));
221 } 217 }
222 /* Search for program; barf if not found. */ 218 /* Search for program; barf if not found. */
223 openp (Vexec_path, args[0], "", &path, 1); 219 openp (Vexec_path, args[0], EXEC_SUFFIXES, &path, 1);
224 if (NILP (path)) 220 if (NILP (path))
225 { 221 {
226 close (filefd); 222 close (filefd);
@@ -229,7 +225,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.")
229 new_argv[0] = XSTRING (path)->data; 225 new_argv[0] = XSTRING (path)->data;
230 226
231 if (XTYPE (buffer) == Lisp_Int) 227 if (XTYPE (buffer) == Lisp_Int)
232 fd[1] = open ("/dev/null", O_WRONLY), fd[0] = -1; 228 fd[1] = open (NULL_DEVICE, O_WRONLY), fd[0] = -1;
233 else 229 else
234 { 230 {
235 pipe (fd); 231 pipe (fd);