From 637a1aec8fba084c65b0afea3b49959917aaa253 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 20 Jul 2009 14:16:06 +0000 Subject: * fork.cc (fork): Create local tmp_pathbuf. Explain why. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/fork.cc | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 54e65d1b0..9e78d09dd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2009-07-20 Corinna Vinschen + + * fork.cc (fork): Create local tmp_pathbuf. Explain why. + 2009-07-18 Christopher Faylor * exceptions.cc (sig_handle_tty_stop): Set stopsig to SIGCONT when diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 6911da5cd..cdaaca649 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -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) { -- cgit v1.2.3