aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/pinfo.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-02-07 05:28:49 +0000
committerChristopher Faylor <me@cgf.cx>2005-02-07 05:28:49 +0000
commitbec2abd71e3a582cb2727f1246827ab4b2978415 (patch)
tree6b538e9b7dfb7c460115883061fdb8fc9b4bf3af /winsup/cygwin/pinfo.cc
parent7d880770d3b714835e2f0871e0d27c512f3c81b2 (diff)
downloadnewlib-bec2abd71e3a582cb2727f1246827ab4b2978415.zip
newlib-bec2abd71e3a582cb2727f1246827ab4b2978415.tar.gz
newlib-bec2abd71e3a582cb2727f1246827ab4b2978415.tar.bz2
* exceptions.cc: Make windows_system_directory non-static.
* pinfo.cc (pinfo::exit): Change innocuous cd'ed location to one that is more likely to exist.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 7805eb4..367ecd1 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -144,11 +144,11 @@ pinfo::exit (DWORD n)
if (n != EXITCODE_NOSET)
{
- SetCurrentDirectory ("c:\\"); /* Move to an innocuous location to
- avoid races with other processes
- that may want to manipulate the
- current directory before this process
- has completely exited. */
+ 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. */
+ (void) SetCurrentDirectory (windows_system_directory);
self->alert_parent (0); /* Shave a little time by telling our
parent that we have now exited. */
}