diff options
author | Christopher Faylor <me@cgf.cx> | 2000-09-10 20:43:47 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-09-10 20:43:47 +0400 |
commit | 4f7ac76aae140bb9de50fe4c81e3cf6d23b100e2 (patch) | |
tree | 81e313f620968f06dc4d5cc3e42e9919595a52e2 /winsup/cygwin/dcrt0.cc | |
parent | 4497c0df52833fc777f0708567d2e1533ac794dc (diff) |
* dcrt0.cc (dll_crt0_1): Initialize thread and debug stuff before handling
exec/fork.
* dtable.cc (dtable::fixup_after_exec): Always clear out the read ahead buffer
whether closing or adjusting.
* path.cc (chdir): Avoid a compiler warning.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index cc48d7389..ac67eb807 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -644,6 +644,10 @@ dll_crt0_1 () user_data->resourcelocks->Init (); user_data->threadinterface->Init0 (); + + threadname_init (); + debug_init (); + regthread ("main", GetCurrentThreadId ()); char **envp = NULL; @@ -713,9 +717,6 @@ dll_crt0_1 () /* Initialize events. */ events_init (); - threadname_init (); - debug_init (); - /* Allow backup semantics. It's better done only once on process start instead of each time a file is opened. */ set_process_privileges (); |