diff options
author | Christopher Faylor <me@cgf.cx> | 2005-11-17 16:36:00 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-11-17 16:36:00 +0000 |
commit | 7912bcbf361e5a82f910ba6114a04f2806406e4b (patch) | |
tree | 900f08fb426b440d3b51181c354284b488c3d273 /winsup/cygwin/fork.cc | |
parent | 0f46c31745740b8538ce30944182f425ef4f0142 (diff) | |
download | cygnal-7912bcbf361e5a82f910ba6114a04f2806406e4b.tar.gz cygnal-7912bcbf361e5a82f910ba6114a04f2806406e4b.tar.bz2 cygnal-7912bcbf361e5a82f910ba6114a04f2806406e4b.zip |
* fork.cc (fork): Move top-of-stack calculation later.
* pinfo.cc (_pinfo::set_ctty): Use __ctty to print current console in debugging
output.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r-- | winsup/cygwin/fork.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index a9117e7c8..374eb0fdb 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -557,11 +557,8 @@ fork () grouped.load_dlls = 0; int res; - void *esp; int ischild; - __asm__ volatile ("movl %%esp,%0": "=r" (esp)); - myself->set_has_pgid_children (); if (grouped.ch.parent == NULL) @@ -574,6 +571,10 @@ fork () sig_send (NULL, __SIGHOLD); ischild = setjmp (grouped.ch.jmp); + + void *esp; + __asm__ volatile ("movl %%esp,%0": "=r" (esp)); + if (!ischild) res = grouped.parent (esp); else |