Mercurial > hg > xemacs-beta
diff src/ntproc.c @ 124:9b50b4588a93 r20-1b15
Import from CVS: tag r20-1b15
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:26:39 +0200 |
parents | 4be1180a9e89 |
children | 41ff10fd062f |
line wrap: on
line diff
--- a/src/ntproc.c Mon Aug 13 09:26:04 2007 +0200 +++ b/src/ntproc.c Mon Aug 13 09:26:39 2007 +0200 @@ -586,7 +586,8 @@ int pid; child_process *cp; int is_dos_binary; - + struct gcpro gcpro1; + /* We don't care about the other modes */ if (mode != _P_NOWAIT) { @@ -596,22 +597,22 @@ /* Handle executable names without an executable suffix. */ program = make_string (cmdname, strlen (cmdname)); + GCPRO1 (program); if (NILP (Ffile_executable_p (program))) { - struct gcpro gcpro1; - full = Qnil; - GCPRO1 (program); locate_file (Vexec_path, program, EXEC_SUFFIXES, &full, 1); - UNGCPRO; if (NILP (full)) { + UNGCPRO; errno = EINVAL; return -1; } cmdname = XSTRING (full)->_data; argv[0] = cmdname; } + UNGCPRO; + /* make sure cmdname is in DOS format */ strcpy (cmdname = alloca (strlen (cmdname) + 1), argv[0]);