diff options
| -rw-r--r-- | src/callproc.c | 10 | ||||
| -rw-r--r-- | src/process.c | 4 | ||||
| -rw-r--r-- | src/process.h | 11 |
3 files changed, 16 insertions, 9 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); |
diff --git a/src/process.c b/src/process.c index ed80460286a..d52f52bcdfd 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1034,7 +1034,7 @@ Remaining arguments are strings to give program as arguments.") | |||
| 1034 | if (new_argv[0][0] != '/') | 1034 | if (new_argv[0][0] != '/') |
| 1035 | { | 1035 | { |
| 1036 | tem = Qnil; | 1036 | tem = Qnil; |
| 1037 | openp (Vexec_path, program, "", &tem, 1); | 1037 | openp (Vexec_path, program, EXEC_SUFFIXES, &tem, 1); |
| 1038 | if (NILP (tem)) | 1038 | if (NILP (tem)) |
| 1039 | report_file_error ("Searching for program", Fcons (program, Qnil)); | 1039 | report_file_error ("Searching for program", Fcons (program, Qnil)); |
| 1040 | new_argv[0] = XSTRING (tem)->data; | 1040 | new_argv[0] = XSTRING (tem)->data; |
| @@ -2597,7 +2597,7 @@ nil, indicating the current buffer's process.") | |||
| 2597 | else | 2597 | else |
| 2598 | { | 2598 | { |
| 2599 | close (XPROCESS (proc)->outfd); | 2599 | close (XPROCESS (proc)->outfd); |
| 2600 | XFASTINT (XPROCESS (proc)->outfd) = open ("/dev/null", O_WRONLY); | 2600 | XFASTINT (XPROCESS (proc)->outfd) = open (NULL_DEVICE, O_WRONLY); |
| 2601 | } | 2601 | } |
| 2602 | #endif /* VMS */ | 2602 | #endif /* VMS */ |
| 2603 | #endif /* did not do TOICREMOTE */ | 2603 | #endif /* did not do TOICREMOTE */ |
diff --git a/src/process.h b/src/process.h index 8f476f6894d..2ac7b59c6b7 100644 --- a/src/process.h +++ b/src/process.h | |||
| @@ -91,3 +91,14 @@ extern char *synch_process_death; | |||
| 91 | this is exit code of synchronous subprocess. */ | 91 | this is exit code of synchronous subprocess. */ |
| 92 | extern int synch_process_retcode; | 92 | extern int synch_process_retcode; |
| 93 | 93 | ||
| 94 | /* The name of the file open to get a null file, or a data sink. | ||
| 95 | VMS, MS-DOS, and OS/2 redefine this. */ | ||
| 96 | #ifndef NULL_DEVICE | ||
| 97 | #define NULL_DEVICE "/dev/null" | ||
| 98 | #endif | ||
| 99 | |||
| 100 | /* A string listing the possible suffixes used for executable files, | ||
| 101 | separated by colons. VMS, MS-DOS, and OS/2 redefine this. */ | ||
| 102 | #ifndef EXEC_SUFFIXES | ||
| 103 | #define EXEC_SUFFIXES "" | ||
| 104 | #endif | ||