summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fork.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-03-22 16:42:45 +0000
committerChristopher Faylor <me@cgf.cx>2006-03-22 16:42:45 +0000
commit81010d21e6d40a76e9cdee849f21c90da5f54bec (patch)
tree8422d18565d56adbaea7d8d681957034bbb3b53d /winsup/cygwin/fork.cc
parent69769b7cb50c9b0dc1f6921bc76b94a2558595ff (diff)
downloadcygnal-81010d21e6d40a76e9cdee849f21c90da5f54bec.tar.gz
cygnal-81010d21e6d40a76e9cdee849f21c90da5f54bec.tar.bz2
cygnal-81010d21e6d40a76e9cdee849f21c90da5f54bec.zip
* fhandler.cc (fcntl): Print flags in hex.
* dcrt0.cc (dll_crt0_0): Semi-revert 2006-03-14 change which moved pinfo_init and uinfo_init here. (dll_crt0_1): Ditto. (__dll_crt0): Ditto. Don't call update_envptrs here. (dll_crt0_1): Ditto. Move wait_for_sigthread call here from dll_crt0_0. * environ.cc (environ_init): Call it here instead. * sigproc.cc (my_readsig): New static variable. (wait_for_sigthread): Set up read pipe here since we are assured that we have the proper privileges when this is called. (talktome): Eliminate second argument since it is available as a global now. (wait_sig): Reflect use of my_readsig.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 0360d1a52..82d1b32b8 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -178,6 +178,7 @@ frok::child (void *)
ld_preload ();
fixup_hooks_after_fork ();
_my_tls.fixup_after_fork ();
+ wait_for_sigthread ();
cygwin_finished_initializing = true;
return 0;
}
@@ -545,10 +546,13 @@ fork ()
void *esp;
__asm__ volatile ("movl %%esp,%0": "=r" (esp));
- if (!ischild)
- res = grouped.parent (esp);
- else
+ if (ischild)
res = grouped.child (esp);
+ else
+ {
+ res = grouped.parent (esp);
+ sig_send (NULL, __SIGNOHOLD);
+ }
MALLOC_CHECK;
if (ischild || res > 0)
@@ -568,7 +572,6 @@ fork ()
set_errno (grouped.this_errno);
}
- sig_send (NULL, __SIGNOHOLD);
syscall_printf ("%d = fork()", res);
return res;
}