diff options
author | Christopher Faylor <me@cgf.cx> | 2005-10-29 20:33:59 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-10-29 20:33:59 +0000 |
commit | 0dc249751dd6969bd091448120efb13291d1105c (patch) | |
tree | a7e14835cea42b2c45f9a4f9440d2a601ad21107 /winsup/cygwin/fork.cc | |
parent | f02b22dcee17b7f533c99c59e48dfe0d58e2382e (diff) | |
download | cygnal-0dc249751dd6969bd091448120efb13291d1105c.tar.gz cygnal-0dc249751dd6969bd091448120efb13291d1105c.tar.bz2 cygnal-0dc249751dd6969bd091448120efb13291d1105c.zip |
* exceptions.cc (signal_exit): Eliminate setting of main thread priority since
process lock should make that unnecessary.
* fork.cc (stack_base): Eliminate.
(frok::parent): Subsume stack_base and just set stack stuff here. Report on
priority class in debugging output.
* spawn.cc (spawn_guts): Report on priority class in debugging output.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r-- | winsup/cygwin/fork.cc | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 4f481b0f8..31d2a10b5 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -55,17 +55,6 @@ class frok friend int fork (); }; -static void -stack_base (child_info_fork *ch) -{ - ch->stackbottom = _tlsbase; - ch->stacktop = &ch; - ch->stacksize = (char *) ch->stackbottom - (char *) &ch; - debug_printf ("bottom %p, top %p, stack %p, size %d, reserve %d", - ch->stackbottom, ch->stacktop, &ch, ch->stacksize, - (char *) ch->stackbottom - (char *) ch->stacktop); -} - /* Copy memory from parent to child. The result is a boolean indicating success. */ @@ -299,6 +288,7 @@ frok::parent (void *stack_here) pthread::atforkprepare (); int c_flags = GetPriorityClass (hMainProc); + debug_printf ("priority class %d", c_flags); STARTUPINFO si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL}; /* If we don't have a console, then don't create a console for the @@ -342,7 +332,11 @@ frok::parent (void *stack_here) ch.forker_finished = forker_finished; - stack_base (&ch); + ch.stackbottom = _tlsbase; + ch.stacktop = stack_here; + ch.stacksize = (char *) ch.stackbottom - (char *) stack_here; + debug_printf ("stack - bottom %p, top %p, size %d", + ch.stackbottom, ch.stacktop, ch.stacksize); si.cb = sizeof (STARTUPINFO); si.lpReserved2 = (LPBYTE) &ch; |