diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-11-30 10:17:24 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-11-30 10:17:24 +0000 |
commit | 8eca5362726ea2c0a83ca1e9d64086f2e58c22f5 (patch) | |
tree | 141293452df077b472e53ee7f817c343a3441a90 /winsup/cygwin/spawn.cc | |
parent | 7d794364439c77f23403eaa09169ca8884bfe091 (diff) | |
download | cygnal-8eca5362726ea2c0a83ca1e9d64086f2e58c22f5.tar.gz cygnal-8eca5362726ea2c0a83ca1e9d64086f2e58c22f5.tar.bz2 cygnal-8eca5362726ea2c0a83ca1e9d64086f2e58c22f5.zip |
* dir.cc (mkdir): Check last path component for "..".
(rmdir): Don't check last path component for "..".
* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Drop kludge
which tries to allow deleting the current working directory.
* path.cc (has_dot_last_component): Add parameter to indicate testing
for "..". Take trailing slash into account.
(symlink_info::posixify): Rely on cygheap->cwd.win32 having a
useful value.
(cwdstuff::init): Initialize cygheap->cwd with current working
directory. Change to windows_system_directory afterwards.
(cwdstuff::set): Never call SetCurrentDirectory here. Just check
if changing into target directory would be allowed. Add comment to
explain why.
* path.h (has_dot_last_component): Declare with second parameter.
* pinfo.cc (pinfo::zap_cwd): Remove.
(pinfo::exit): Drop call to zap_cwd.
* pinfo.h (class pinfo): Remove declaration of zap_cwd.
* spawn.cc (spawn_guts): Set current working directory for non-Cygwin
child applications. Drop call to zap_cwd.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 2771d87e0..d1750f744 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -501,7 +501,7 @@ loop: TRUE, /* inherit handles from parent */ c_flags, envblock, /* environment */ - 0, /* use current drive/directory */ + real_path.iscygexec () ? NULL : cygheap->cwd.win32, &si, &pi); } @@ -536,7 +536,7 @@ loop: TRUE, /* inherit handles from parent */ c_flags, envblock, /* environment */ - 0, /* use current drive/directory */ + real_path.iscygexec () ? NULL : cygheap->cwd.win32, &si, &pi); } @@ -613,7 +613,6 @@ loop: myself->sync_proc_pipe (); /* Make sure that we own wr_proc_pipe just in case we've been previously execed. */ - myself.zap_cwd (); } orig_wr_proc_pipe = myself->dup_proc_pipe (pi.hProcess); } |