From: Richard M. Stallman Date: Thu, 15 Jun 1995 15:29:00 +0000 (+0000) Subject: (win32_spawnve): Accept program names without executable suffixes. X-Git-Tag: emacs-19.34~3620 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0a4de642e4db66aa01ea94790c5c9ce78eb75906;p=emacs.git (win32_spawnve): Accept program names without executable suffixes. --- diff --git a/src/w32proc.c b/src/w32proc.c index 981876e6b16..e7834d6a452 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -427,10 +427,30 @@ char ppid_env_var_buffer[64]; int win32_spawnve (int mode, char *cmdname, char **argv, char **envp) { + Lisp_Object program, full; char *cmdline, *env, *parg, **targ; int arglen; PROCESS_INFORMATION pi; - + + /* Handle executable names without an executable suffix. */ + program = make_string (cmdname, strlen (cmdname)); + if (NILP (Ffile_executable_p (program))) + { + struct gcpro gcpro1; + + full = Qnil; + GCPRO1 (program); + openp (Vexec_path, program, EXEC_SUFFIXES, &full, 1); + UNGCPRO; + if (NILP (full)) + { + errno = EINVAL; + return -1; + } + cmdname = XSTRING (full)->data; + argv[0] = cmdname; + } + if (child_proc_count == MAX_CHILDREN) { errno = EAGAIN;