]> sourceware.org Git - newlib-cygwin.git/commitdiff
* exceptions.cc: Make windows_system_directory non-static.
authorChristopher Faylor <me@cgf.cx>
Mon, 7 Feb 2005 05:28:49 +0000 (05:28 +0000)
committerChristopher Faylor <me@cgf.cx>
Mon, 7 Feb 2005 05:28:49 +0000 (05:28 +0000)
* pinfo.cc (pinfo::exit): Change innocuous cd'ed location to one that is more
likely to exist.

winsup/cygwin/ChangeLog
winsup/cygwin/exceptions.cc
winsup/cygwin/pinfo.cc

index a612dfab376252ddddad870de0bc63ba8e9e9821..a8bfcf7ff2a9f2606a2223798887b6e8bc352f70 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-07  Christopher Faylor  <cgf@timesys.com>
+
+       * 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.
+
 2005-02-06  Corinna Vinschen  <corinna@vinschen.de>
 
        * path.cc (path_conv::check): Leave symlink expansion loop in case
index 2531e6cb87b837433119b97c0add55b904218f77..838cbf32e326a248e13a28ea27d545d4d2c2feb2 100644 (file)
@@ -40,7 +40,7 @@ extern DWORD dwExeced;
 
 static BOOL WINAPI ctrl_c_handler (DWORD);
 static void signal_exit (int) __attribute__ ((noreturn));
-static char windows_system_directory[1024];
+char windows_system_directory[1024];
 static size_t windows_system_directory_length;
 
 /* This is set to indicate that we have already exited.  */
index 7805eb43d6f2e4b3f2bcb697ae338f55f11eed06..367ecd187ffb59be2bcbb2dd7092c62a0c18d49c 100644 (file)
@@ -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.  */
     }
This page took 0.0374 seconds and 5 git commands to generate.