aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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.")
1080#else /* not VMS */ 1080#else /* not VMS */
1081 new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *)); 1081 new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *));
1082 1082
1083 program = Fexpand_file_name (program, Qnil);
1084
1083 /* If program file name is not absolute, search our path for it */ 1085 /* If program file name is not absolute, search our path for it */
1084 if (!IS_DIRECTORY_SEP (XSTRING (program)->data[0]) 1086 if (!IS_DIRECTORY_SEP (XSTRING (program)->data[0])
1085 && !(XSTRING (program)->size > 1 1087 && !(XSTRING (program)->size > 1
@@ -1096,7 +1098,12 @@ Remaining arguments are strings to give program as arguments.")
1096 new_argv[0] = XSTRING (tem)->data; 1098 new_argv[0] = XSTRING (tem)->data;
1097 } 1099 }
1098 else 1100 else
1099 new_argv[0] = XSTRING (program)->data; 1101 {
1102 if (!NILP (Ffile_directory_p (program)))
1103 error ("Specified program for new process is a directory");
1104
1105 new_argv[0] = XSTRING (program)->data;
1106 }
1100 1107
1101 for (i = 3; i < nargs; i++) 1108 for (i = 3; i < nargs; i++)
1102 { 1109 {