From 191ea07aa5eff3a377f9b5eed6c25755965d4ccb Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 12 May 2004 12:28:59 +0000 Subject: [PATCH] * cygheap.h (struct init_cygheap): Add mt_h member. * fhandler_tape.cc (mt_h): Drop in favor of cygheap based handle. (mtinfo_init): Use cygheap->mt_h handle. Protect it. --- winsup/cygwin/ChangeLog | 8 +++++++- winsup/cygwin/cygheap.h | 1 + winsup/cygwin/fhandler_tape.cc | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 2d6d8382f..3fd05d912 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2004-05-12 Corinna Vinschen + + * cygheap.h (struct init_cygheap): Add mt_h member. + * fhandler_tape.cc (mt_h): Drop in favor of cygheap based handle. + (mtinfo_init): Use cygheap->mt_h handle. Protect it. + 2004-05-12 Pierre Humblet * tty.h: Remove the %d or %x from all cygtty strings. @@ -13,7 +19,7 @@ (tty::open_input_mutex): Ditto. (tty::open_mutex): New method. -2004-05-10 Corinna Vinschen +2004-05-11 Corinna Vinschen * fhandler.cc (fhandler_base::open): Set file attributes to correct value when creating files. diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h index 8d065fee9..a32e0d5d1 100644 --- a/winsup/cygwin/cygheap.h +++ b/winsup/cygwin/cygheap.h @@ -253,6 +253,7 @@ struct init_cygheap mode_t umask; HANDLE shared_h; HANDLE console_h; + HANDLE mt_h; char *cygwin_regname; cwdstuff cwd; dtable fdtab; diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc index 1309b3ba8..a8d0f3294 100644 --- a/winsup/cygwin/fhandler_tape.cc +++ b/winsup/cygwin/fhandler_tape.cc @@ -1169,13 +1169,13 @@ mtinfo::initialize (void) } } -HANDLE mt_h; mtinfo *mt; void __stdcall mtinfo_init () { - mt = (mtinfo *) open_shared ("mtinfo", MTINFO_VERSION, mt_h, sizeof (mtinfo), SH_MTINFO); + mt = (mtinfo *) open_shared ("mtinfo", MTINFO_VERSION, cygheap->mt_h, sizeof (mtinfo), SH_MTINFO); + ProtectHandleINH (cygheap->mt_h); mt->initialize (); }