summaryrefslogtreecommitdiff
path: root/src/process.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-07-07 13:34:16 +0000
committerRichard M. Stallman <rms@gnu.org>1995-07-07 13:34:16 +0000
commit13373f4ece72d1aca9573e236fd7391fd677e728 (patch)
tree9343f600be464ea3ee29df4e0991766138f6b36f /src/process.c
parent553a1e4656bdf72d87abab8cfb312033c0a0ecef (diff)
downloademacs-13373f4ece72d1aca9573e236fd7391fd677e728.tar.gz
(Fstart_process): Expand PROGRAM.
Error if it is a directory.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c
index adecb580634..02f8cc29bac 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1080,6 +1080,8 @@ Remaining arguments are strings to give program as arguments.")
#else /* not VMS */
new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *));
+ program = Fexpand_file_name (program, Qnil);
+
/* If program file name is not absolute, search our path for it */
if (!IS_DIRECTORY_SEP (XSTRING (program)->data[0])
&& !(XSTRING (program)->size > 1
@@ -1096,7 +1098,12 @@ Remaining arguments are strings to give program as arguments.")
new_argv[0] = XSTRING (tem)->data;
}
else
- new_argv[0] = XSTRING (program)->data;
+ {
+ if (!NILP (Ffile_directory_p (program)))
+ error ("Specified program for new process is a directory");
+
+ new_argv[0] = XSTRING (program)->data;
+ }
for (i = 3; i < nargs; i++)
{