diff options
| author | Geoff Voelker | 1997-09-23 17:30:24 +0000 |
|---|---|---|
| committer | Geoff Voelker | 1997-09-23 17:30:24 +0000 |
| commit | b4c7684c9074145635d0a923c5b21279b7dff704 (patch) | |
| tree | eed5c19194fc6caf741b44d371a73835373a3eb7 /src | |
| parent | 7547360ede273780c806a36321a0f715ce16d4fa (diff) | |
| download | emacs-b4c7684c9074145635d0a923c5b21279b7dff704.tar.gz emacs-b4c7684c9074145635d0a923c5b21279b7dff704.zip | |
(child_setup) [WINDOWSNT]: Change directory of
child instead of parent.
Diffstat (limited to 'src')
| -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) | |||
| 954 | if (!IS_DIRECTORY_SEP (temp[i - 1])) temp[i++] = DIRECTORY_SEP; | 954 | if (!IS_DIRECTORY_SEP (temp[i - 1])) temp[i++] = DIRECTORY_SEP; |
| 955 | temp[i] = 0; | 955 | temp[i] = 0; |
| 956 | 956 | ||
| 957 | #ifndef WINDOWSNT | ||
| 957 | /* We can't signal an Elisp error here; we're in a vfork. Since | 958 | /* We can't signal an Elisp error here; we're in a vfork. Since |
| 958 | the callers check the current directory before forking, this | 959 | the callers check the current directory before forking, this |
| 959 | should only return an error if the directory's permissions | 960 | 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) | |||
| 961 | at least check. */ | 962 | at least check. */ |
| 962 | if (chdir (temp) < 0) | 963 | if (chdir (temp) < 0) |
| 963 | _exit (errno); | 964 | _exit (errno); |
| 965 | #endif | ||
| 964 | 966 | ||
| 965 | /* Strip trailing slashes for PWD, but leave "/" and "//" alone. */ | 967 | /* Strip trailing slashes for PWD, but leave "/" and "//" alone. */ |
| 966 | while (i > 2 && IS_DIRECTORY_SEP (temp[i - 1])) | 968 | while (i > 2 && IS_DIRECTORY_SEP (temp[i - 1])) |
| @@ -1020,6 +1022,7 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir) | |||
| 1020 | } | 1022 | } |
| 1021 | #ifdef WINDOWSNT | 1023 | #ifdef WINDOWSNT |
| 1022 | prepare_standard_handles (in, out, err, handles); | 1024 | prepare_standard_handles (in, out, err, handles); |
| 1025 | set_process_dir (XSTRING (current_dir)->data); | ||
| 1023 | #else /* not WINDOWSNT */ | 1026 | #else /* not WINDOWSNT */ |
| 1024 | /* Make sure that in, out, and err are not actually already in | 1027 | /* Make sure that in, out, and err are not actually already in |
| 1025 | descriptors zero, one, or two; this could happen if Emacs is | 1028 | descriptors zero, one, or two; this could happen if Emacs is |