OSDN Git Service

* fork.cc (fork): Create local tmp_pathbuf. Explain why.
authorcorinna <corinna>
Mon, 20 Jul 2009 14:16:05 +0000 (14:16 +0000)
committercorinna <corinna>
Mon, 20 Jul 2009 14:16:05 +0000 (14:16 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/fork.cc

index 54e65d1..9e78d09 100644 (file)
@@ -1,3 +1,7 @@
+2009-07-20  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fork.cc (fork): Create local tmp_pathbuf.  Explain why.
+
 2009-07-18  Christopher Faylor  <me+cygwin@cgf.cx>
 
        * exceptions.cc (sig_handle_tty_stop): Set stopsig to SIGCONT when
index 6911da5..cdaaca6 100644 (file)
@@ -580,6 +580,11 @@ fork ()
 
   {
     hold_everything held_everything (ischild);
+    /* This tmp_pathbuf constructor is required here because the below setjmp
+       magic will otherwise not restore the original buffer count values in
+       the thread-local storage.  A process forking too deeply will run into
+       the problem to be out of temporary TLS path buffers. */
+    tmp_pathbuf tp;
 
     if (!held_everything)
       {