summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-09-13 17:08:54 +0000
committerChristopher Faylor <me@cgf.cx>2005-09-13 17:08:54 +0000
commit67483cb2cdee37aa435fd108cea5310a873925a3 (patch)
tree4a959e9d5c14f812a42061b608780e84b4371a41 /winsup/cygwin/dcrt0.cc
parent00fb79f70e0ef973da36b26ada9ca13daad81c4b (diff)
downloadcygnal-67483cb2cdee37aa435fd108cea5310a873925a3.tar.gz
cygnal-67483cb2cdee37aa435fd108cea5310a873925a3.tar.bz2
cygnal-67483cb2cdee37aa435fd108cea5310a873925a3.zip
* dcrt0.cc (do_exit): Rely on sigproc_terminate to set exit_state
appropriately. * pinfo.cc (pinfo::exit): Always call sigproc_terminate here. Rely on sigproc_terminate to signal signal thread to handle eventual process exit. * sigproc.cc (no_signals_available): Change criteria for determining if this process can handle signals to itself. (my_sendsig): New variable. Copy of my sendsig handle. (proc_can_be_signalled): Don't send signals if exit code is set. (sigproc_terminate): Use and set exit_state appropriately to determine when to do anything. Send __SIGEXIT to self to control process exit. (sig_send): Use my_sendsig for sending signals. Don't call proc_can_be_signalled for myself since the criteria is now different for sending signals to myself. (wait_sig): Copy myself->sendsig to my_sendsig for future use. Exit signal loop when __SIGEXIT is received. Wait for main thread to exit and use its exit status to actually exit process. * sigproc.h (__SIGEXIT): New enum. * dcrt0.cc (alloc_stack): Eliminate superfluous "return;". * debug.cc (add_handle): Ditto. * devices.in (device::parse): Ditto. * dtable.cc (dtable::vfork_parent_restore): Ditto. (dtable::vfork_child_fixup): Ditto. * environ.cc (parse_options): Ditto. * errno.cc (seterrno_from_win_error): Ditto. * exceptions.cc (sig_handle_tty_stop): Ditto. (set_signal_mask): Ditto. * fhandler.cc (fhandler_base::read): Ditto. (fhandler_base::operator delete): Ditto. (fhandler_base::seekdir): Ditto. (fhandler_base::rewinddir): Ditto. * fhandler_console.cc (fhandler_console::read): Ditto. (fhandler_console::fixup_after_exec): Ditto. * sigproc.cc (sigproc_init): Ditto. (sigproc_terminate): Ditto. * devices.cc: Regenerate.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 1783d5564..b7207667f 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -518,8 +518,6 @@ alloc_stack (child_info_fork *ci)
ci->stacksize = 0;
else
alloc_stack_hard_way (ci, b + sizeof (b) - 1);
-
- return;
}
#ifdef DEBUGGING
@@ -1059,10 +1057,7 @@ do_exit (int status)
}
if (exit_state < ES_SIGPROCTERMINATE)
- {
- exit_state = ES_SIGPROCTERMINATE;
- sigproc_terminate ();
- }
+ sigproc_terminate (); // sets exit_state directly
myself->stopsig = 0;
if (exit_state < ES_TITLE)