Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-10-09 01:40:33 +0400
committerChristopher Faylor <me@cgf.cx>2003-10-09 01:40:33 +0400
commitea4980efe151615da1d289b385feee0b267dbaa0 (patch)
treea5728a52e98cd241cf39d5d43e30560af5cd96ae /winsup/cygwin
parente9ea9dec2ce47789a3080d828ee7c9d02034ce71 (diff)
* dcrt0.cc (hMainProc): Initialize to useful value for use when dll is
dynamically loaded. (shared_info::initialize): Don't initialize user stuff if myself doesn't exit.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/dcrt0.cc2
-rw-r--r--winsup/cygwin/shared.cc3
3 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 3be344dd7..854ddbd1f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2003-10-08 Christopher Faylor <cgf@redhat.com>
+
+ * dcrt0.cc (hMainProc): Initialize to useful value for use when dll is
+ dynamically loaded.
+ (shared_info::initialize): Don't initialize user stuff if myself
+ doesn't exit.
+
2003-10-08 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (unlink): Don't even try DELETE_ON_CLOSE technique on
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index a09b7e81b..b862ee150 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -39,7 +39,7 @@ details. */
#define PREMAIN_LEN (sizeof (user_data->premain) / sizeof (user_data->premain[0]))
-HANDLE NO_COPY hMainProc;
+HANDLE NO_COPY hMainProc = (HANDLE) -1;
HANDLE NO_COPY hMainThread;
sigthread NO_COPY mainthread; // ID of the main thread
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
index 911465aea..b3da33b66 100644
--- a/winsup/cygwin/shared.cc
+++ b/winsup/cygwin/shared.cc
@@ -220,7 +220,8 @@ shared_info::initialize ()
if (!cygheap)
{
cygheap_init ();
- cygheap->user.init ();
+ if (myself)
+ cygheap->user.init ();
}
heap_init ();