summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-08-26 01:36:20 +0000
committerChristopher Faylor <me@cgf.cx>2000-08-26 01:36:20 +0000
commit3c2c374555e45b55f0fdc6f1c37257bc631cf5ab (patch)
tree73f97864758c82b21151cb456ce9666cab91da2a /winsup/cygwin/dcrt0.cc
parent14d3488d1f45a6ac4fffd4e3ab891f5b9d2ffac9 (diff)
downloadcygnal-3c2c374555e45b55f0fdc6f1c37257bc631cf5ab.tar.gz
cygnal-3c2c374555e45b55f0fdc6f1c37257bc631cf5ab.tar.bz2
cygnal-3c2c374555e45b55f0fdc6f1c37257bc631cf5ab.zip
* dcrt0.cc (dll_crt0_1): Move set_os_type.
(_dll_crt0): To here. (cygwin_dll_init): And here. * external.cc (fillout_pinfo): Use more foolproof method for scanning for pids. * pinfo.cc (set_myself): Eliminate myself_identity.init. * sigproc.cc (wait_sig): Do it here instead to reduce the amount of time where there could potentially be two processes with the same pid. * spawn.cc (spawn_guts): Eliminate duplicate initialization. * include/sys/cygwin.h: Mark unused PID_* elements.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 95b0a5720..40339366c 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -646,9 +646,6 @@ dll_crt0_1 ()
user_data->threadinterface->Init0();
#endif
- /* Set the os_being_run global. */
- set_os_type ();
-
/* Initialize the host dependent constants object. */
host_dependent.init ();
@@ -811,6 +808,9 @@ _dll_crt0 ()
init_exceptions (&cygwin_except_entry);
do_global_ctors (&__CTOR_LIST__, 1);
+ /* Set the os_being_run global. */
+ set_os_type ();
+
#ifdef DEBUGGING
char buf[80];
if (GetEnvironmentVariable ("CYGWIN_SLEEP", buf, sizeof (buf)))
@@ -922,6 +922,9 @@ cygwin_dll_init ()
init_exceptions (&cygwin_except_entry);
do_global_ctors (&__CTOR_LIST__, 1);
+ /* Set the os_being_run global. */
+ set_os_type ();
+
user_data->heapbase = user_data->heapptr = user_data->heaptop = NULL;
if (!DuplicateHandle (GetCurrentProcess (), GetCurrentProcess (),