* dll_init.cc (dll_dllcrt0): Previous change didn't work very well with fork.
Semi-revert it but change name of variable to something that makes better sense.
This commit is contained in:
parent
17fed6fefc
commit
29d1e62ed2
@ -1,3 +1,9 @@
|
|||||||
|
2006-05-27 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* dll_init.cc (dll_dllcrt0): Previous change didn't work very well with
|
||||||
|
fork. Semi-revert it but change name of variable to something that
|
||||||
|
makes better sense.
|
||||||
|
|
||||||
2006-05-27 Christopher Faylor <cgf@timesys.com>
|
2006-05-27 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* thread.cc (verifyable_object_isvalid): Check for NULL specifically.
|
* thread.cc (verifyable_object_isvalid): Check for NULL specifically.
|
||||||
|
@ -365,6 +365,8 @@ dll_dllcrt0 (HMODULE h, per_process *p)
|
|||||||
else
|
else
|
||||||
*(p->impure_ptr_ptr) = __cygwin_user_data.impure_ptr;
|
*(p->impure_ptr_ptr) = __cygwin_user_data.impure_ptr;
|
||||||
|
|
||||||
|
bool linking = !in_forkee && !cygwin_finished_initializing;
|
||||||
|
|
||||||
/* Partially initialize Cygwin guts for non-cygwin apps. */
|
/* Partially initialize Cygwin guts for non-cygwin apps. */
|
||||||
if (dynamically_loaded && user_data->magic_biscuit == 0)
|
if (dynamically_loaded && user_data->magic_biscuit == 0)
|
||||||
dll_crt0 (p);
|
dll_crt0 (p);
|
||||||
@ -377,7 +379,7 @@ dll_dllcrt0 (HMODULE h, per_process *p)
|
|||||||
initializing, then the DLL must be a cygwin-aware DLL
|
initializing, then the DLL must be a cygwin-aware DLL
|
||||||
that was explicitly linked into the program rather than
|
that was explicitly linked into the program rather than
|
||||||
a dlopened DLL. */
|
a dlopened DLL. */
|
||||||
if (cygwin_finished_initializing)
|
if (linking)
|
||||||
type = DLL_LINK;
|
type = DLL_LINK;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -393,7 +395,7 @@ dll_dllcrt0 (HMODULE h, per_process *p)
|
|||||||
initialize the DLL. If we haven't finished initializing,
|
initialize the DLL. If we haven't finished initializing,
|
||||||
it may not be safe to call the dll's "main" since not
|
it may not be safe to call the dll's "main" since not
|
||||||
all of cygwin's internal structures may have been set up. */
|
all of cygwin's internal structures may have been set up. */
|
||||||
if (!d || (cygwin_finished_initializing && !d->init ()))
|
if (!d || (!linking && !d->init ()))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return (DWORD) d;
|
return (DWORD) d;
|
||||||
|
Loading…
Reference in New Issue
Block a user