aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-01-05 16:26:22 +0000
committerChristopher Faylor <me@cgf.cx>2006-01-05 16:26:22 +0000
commit4cf4fd4d1c413ac782504183ec614aed0ed68fb6 (patch)
tree6521bc283b7ce4859d926a8e27e5f5e5a50ed7f0
parent32f0697595b97a07b17f982bb182722a80b388e7 (diff)
downloadnewlib-4cf4fd4d1c413ac782504183ec614aed0ed68fb6.zip
newlib-4cf4fd4d1c413ac782504183ec614aed0ed68fb6.tar.gz
newlib-4cf4fd4d1c413ac782504183ec614aed0ed68fb6.tar.bz2
(fix ChangeLog and check in remaining files)
* sigproc.cc (sigproc_init): Move clearing of sync_startup here to lessen the likelihood of trying to deal with non-cygwin threads in dll_entry. * fhandler_console: Fix set_console_state_for_spawn comment.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/cygtls.cc3
-rw-r--r--winsup/cygwin/fhandler_console.cc2
-rw-r--r--winsup/cygwin/sigproc.cc2
4 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 676c576..4202ca0 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -2,6 +2,11 @@
* cygtls.cc (_cygtls::remove): Don't output debugging info if this
isn't a cygwin thread.
+ * sigproc.cc (sigproc_init): Move clearing of sync_startup here to
+ lessen the likelihood of trying to deal with non-cygwin threads in
+ dll_entry.
+
+ * fhandler_console: Fix set_console_state_for_spawn comment.
2006-01-05 Igor Peshansky <pechtcha@cs.nyu.edu>
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index 297d9c6..89466a5 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -146,9 +146,10 @@ _cygtls::fixup_after_fork ()
void
_cygtls::remove (DWORD wait)
{
- debug_printf ("wait %p", wait);
if (!isinitialized () || !locals.exitsock || exit_state >= ES_FINAL)
return;
+
+ debug_printf ("wait %p", wait);
if (wait)
{
/* FIXME: Need some sort of atthreadexit function to allow things like
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index c130d9b..a86dc7a 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -141,7 +141,7 @@ tty_list::get_tty (int n)
}
/* Determine if a console is associated with this process prior to a spawn.
- If it is, then we'll return 1. If the console has been initialized, then
+ If it is, then just return. If the console has been initialized, then
set it into a more friendly state for non-cygwin apps. */
void __stdcall
set_console_state_for_spawn (bool noncygwin_process)
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 46bfc25..fb45ed9 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -474,6 +474,7 @@ create_signal_arrived ()
void __stdcall
sigproc_init ()
{
+ extern HANDLE sync_startup;
wait_sig_inited = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
ProtectHandle (wait_sig_inited);
@@ -483,6 +484,7 @@ sigproc_init ()
sync_proc_subproc.init ("sync_proc_subproc");
my_sendsig = INVALID_HANDLE_VALUE; // changed later
+ sync_startup = NULL;
cygthread *hwait_sig = new cygthread (wait_sig, 0, cygself, "sig");
hwait_sig->zap_h ();