]> code.delx.au - gnu-emacs/commitdiff
(child_setup) [WINDOWSNT]: Change directory of
authorGeoff Voelker <voelker@cs.washington.edu>
Tue, 23 Sep 1997 17:30:24 +0000 (17:30 +0000)
committerGeoff Voelker <voelker@cs.washington.edu>
Tue, 23 Sep 1997 17:30:24 +0000 (17:30 +0000)
child instead of parent.

src/callproc.c

index 18bed61738cf0b3afa12bebef8f0a29abb4718bc..62b0b605f6ffdcfae10ea97788404a94c2321092 100644 (file)
@@ -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