summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-09-12 03:47:57 +0000
committerChristopher Faylor <me@cgf.cx>2004-09-12 03:47:57 +0000
commitd584454c8231f5811136b1ab88defe6e5ca81923 (patch)
tree895b902952e3c3d4e329703af6ccc29275b9fec5 /winsup/cygwin/dcrt0.cc
parentca5ec6685a79620c1e24d2ca19081ee4f432b316 (diff)
downloadcygnal-d584454c8231f5811136b1ab88defe6e5ca81923.tar.gz
cygnal-d584454c8231f5811136b1ab88defe6e5ca81923.tar.bz2
cygnal-d584454c8231f5811136b1ab88defe6e5ca81923.zip
* exceptions.cc: (ctrl_c_handler): Do nothing while a Cygwin subprocess is
starting. * child_info.h (init_child_info): Remove pid argument from declaration. * cygheap.h (init_cygheap::pid): New element. * dcrt0.cc (dll_crt0_0): Eliminate handling of now-noexistent cygpid parameter in child_info struct. Set forkee to 'true' rather than cygpid since the pid value was never used. (dll_crt0_1): Ditto. (_dll_crt0): Ditto. * fork.cc (fork_child): Don't wait for sigthread. This is handled in the fork call now. (fork_parent): Remove obsolete pid argument from init_child_info call. Don't do anything special with cygpid when DEBUGGING. (fork): Delay all signals during fork. (fork_init): Don't do anything special when DEBUGGING. * pinfo.cc (set_myself): Remove pid parameter. Use new pid field in cygheap. (pinfo_init): Don't pass pid argument to set_myself. * sigproc.cc (sig_send): Wait for dwProcessId to be non-zero as well as sendsig. (init_child_info): Eliminate handling of pid. (wait_sig): Implement method to temporarily hold off sending signals. * sigproc.h (__SIGHOLD): New enum. (__SIGNOHOLD): Ditto. * spawn.cc (spawn_guts): Remove obsolete pid argument from init_child_info call.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 93568f5fd..2ab6eb610 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -605,7 +605,6 @@ dll_crt0_0 ()
GetStartupInfo (&si);
child_proc_info = (child_info *) si.lpReserved2;
- int mypid = 0;
if (si.cbReserved2 < EXEC_MAGIC_SIZE || !child_proc_info
|| memcmp (child_proc_info->zero, zeros,
sizeof (child_proc_info->zero)) != 0)
@@ -625,7 +624,7 @@ dll_crt0_0 ()
switch (child_proc_info->type)
{
case _PROC_FORK:
- user_data->forkee = child_proc_info->cygpid;
+ user_data->forkee = true;
should_be_cb = sizeof (child_info_fork);
/* fall through */;
case _PROC_SPAWN:
@@ -639,7 +638,6 @@ dll_crt0_0 ()
else
{
cygwin_user_h = child_proc_info->user_h;
- mypid = child_proc_info->cygpid;
break;
}
default:
@@ -667,7 +665,7 @@ dll_crt0_0 ()
alloc_stack (fork_info);
cygheap_fixup_in_child (false);
memory_init ();
- set_myself (mypid);
+ set_myself (NULL);
close_ppid_handle = !!child_proc_info->pppid_handle;
break;
case _PROC_SPAWN:
@@ -686,7 +684,7 @@ dll_crt0_0 ()
hMainProc, &h, 0, FALSE,
DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
h = NULL;
- set_myself (mypid, h);
+ set_myself (h);
__argc = spawn_info->moreinfo->argc;
__argv = spawn_info->moreinfo->argv;
envp = spawn_info->moreinfo->envp;
@@ -771,7 +769,7 @@ dll_crt0_1 (char *)
_tlsbase = (char *) fork_info->stackbottom;
_tlstop = (char *) fork_info->stacktop;
}
- longjmp (fork_info->jmp, fork_info->cygpid);
+ longjmp (fork_info->jmp, true);
}
#ifdef DEBUGGING
@@ -934,7 +932,7 @@ _dll_crt0 ()
_impure_ptr->_current_locale = "C";
if (child_proc_info && child_proc_info->type == _PROC_FORK)
- user_data->forkee = child_proc_info->cygpid;
+ user_data->forkee = true;
else
__sinit (_impure_ptr);