setpgid (0, 0);
tcsetpgrp (0, pid);
- execve (new_argv[0], new_argv, env);
- exec_failed (new_argv[0], errno);
+ int errnum = emacs_exec_file (new_argv[0], new_argv, env);
+ exec_failed (new_argv[0], errnum);
#else /* MSDOS */
pid = run_msdos_command (new_argv, pwd_var + 4, in, out, err, env);
Vprocess_environment))
return *value ? 1 : 0;
+ /* On Windows we make some modifications to Emacs' environment
+ without recording them in Vprocess_environment. */
+#ifdef WINDOWSNT
+ {
+ char* tmpval = getenv (var);
+ if (tmpval)
+ {
+ *value = tmpval;
+ *valuelen = strlen (tmpval);
+ return 1;
+ }
+ }
+#endif
+
/* For DISPLAY try to get the values from the frame or the initial env. */
if (strcmp (var, "DISPLAY") == 0)
{