Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-11-30 13:17:24 +0300
committerCorinna Vinschen <corinna@vinschen.de>2006-11-30 13:17:24 +0300
commit8eca5362726ea2c0a83ca1e9d64086f2e58c22f5 (patch)
tree141293452df077b472e53ee7f817c343a3441a90 /winsup/cygwin/pinfo.cc
parent7d794364439c77f23403eaa09169ca8884bfe091 (diff)
* 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/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc11
1 files changed, 0 insertions, 11 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index d73ad20aa..404591b26 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -123,16 +123,6 @@ pinfo::maybe_set_exit_code_from_windows ()
}
void
-pinfo::zap_cwd ()
-{
- extern char windows_system_directory[];
- /* Move to an innocuous location to avoid a race with other processes
- that may want to manipulate the current directory before this
- process has completely exited. */
- SetCurrentDirectory (windows_system_directory);
-}
-
-void
pinfo::exit (DWORD n)
{
minimal_printf ("winpid %d, exit %d", GetCurrentProcessId (), n);
@@ -148,7 +138,6 @@ pinfo::exit (DWORD n)
}
sigproc_terminate (ES_FINAL);
- zap_cwd ();
/* FIXME: There is a potential race between an execed process and its
parent here. I hated to add a mutex just for that, though. */