diff options
author | Geoff Voelker <voelker@cs.washington.edu> | 1997-09-23 17:30:24 +0000 |
---|---|---|
committer | Geoff Voelker <voelker@cs.washington.edu> | 1997-09-23 17:30:24 +0000 |
commit | b4c7684c9074145635d0a923c5b21279b7dff704 (patch) | |
tree | eed5c19194fc6caf741b44d371a73835373a3eb7 /src/callproc.c | |
parent | 7547360ede273780c806a36321a0f715ce16d4fa (diff) | |
download | emacs-b4c7684c9074145635d0a923c5b21279b7dff704.tar.gz |
(child_setup) [WINDOWSNT]: Change directory of
child instead of parent.
Diffstat (limited to 'src/callproc.c')
-rw-r--r-- | src/callproc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/callproc.c b/src/callproc.c index 18bed61738c..62b0b605f6f 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -954,6 +954,7 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir) if (!IS_DIRECTORY_SEP (temp[i - 1])) temp[i++] = DIRECTORY_SEP; temp[i] = 0; +#ifndef WINDOWSNT /* We can't signal an Elisp error here; we're in a vfork. Since the callers check the current directory before forking, this should only return an error if the directory's permissions @@ -961,6 +962,7 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir) at least check. */ if (chdir (temp) < 0) _exit (errno); +#endif /* Strip trailing slashes for PWD, but leave "/" and "//" alone. */ while (i > 2 && IS_DIRECTORY_SEP (temp[i - 1])) @@ -1020,6 +1022,7 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir) } #ifdef WINDOWSNT prepare_standard_handles (in, out, err, handles); + set_process_dir (XSTRING (current_dir)->data); #else /* not WINDOWSNT */ /* Make sure that in, out, and err are not actually already in descriptors zero, one, or two; this could happen if Emacs is |