diff options
author | Christopher Faylor <me@cgf.cx> | 2004-01-19 23:03:43 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-01-19 23:03:43 +0000 |
commit | d795119cbe7e421ef84df059d5cd26ddc73c31b3 (patch) | |
tree | 3cd0736f67a59f8639db75dbba7bcfd5f776c526 /winsup/cygwin/sigproc.cc | |
parent | 403f752cb26c161ca80bdab4981640316f67ed39 (diff) | |
download | cygnal-d795119cbe7e421ef84df059d5cd26ddc73c31b3.tar.gz cygnal-d795119cbe7e421ef84df059d5cd26ddc73c31b3.tar.bz2 cygnal-d795119cbe7e421ef84df059d5cd26ddc73c31b3.zip |
* sigproc.cc (sigproc_terminate): Don't close sendsig handle when execing since
we're not closing what we think we're closing.
(sig_send): Improve debugging when exiting due to no_signals_available.
* wincap.h (wincaps::cant_debug_dll_entry): New element.
* wincap.cc: Implement above element throughout.
* dcrt0.cc (initial_env): Accommodate changes necessary to allow initial
debugging for systems which do not allow debugging in dll_entry.
(dll_crt0_0): Add initial_env call back here.
* Makefile.in (install-man): Use mandir as target for installation.
* include/cygwin/version.h: Bump DLL minor number to 7 (should have been done
earlier).
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r-- | winsup/cygwin/sigproc.cc | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index a1c2d305d..56aa2805b 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -633,6 +633,7 @@ sigproc_init () void __stdcall sigproc_terminate (void) { + extern HANDLE hExeced; hwait_sig = NULL; if (myself->sendsig == INVALID_HANDLE_VALUE) @@ -642,9 +643,12 @@ sigproc_terminate (void) sigproc_printf ("entering"); // finished with anything it is doing ForceCloseHandle (sigcomplete_main); - HANDLE sendsig = myself->sendsig; - myself->sendsig = INVALID_HANDLE_VALUE; - CloseHandle (sendsig); + if (!hExeced) + { + HANDLE sendsig = myself->sendsig; + myself->sendsig = INVALID_HANDLE_VALUE; + CloseHandle (sendsig); + } } proc_terminate (); // Terminate process handling thread @@ -680,7 +684,11 @@ sig_send (_pinfo *p, siginfo_t& si, _threadinfo *tls) else { if (no_signals_available ()) - goto out; // Either exiting or not yet initializing + { + sigproc_printf ("hwait_sig %p, myself->sendsig %p, exit_state %d", + hwait_sig, myself->sendsig, exit_state); + goto out; // Either exiting or not yet initializing + } if (wait_sig_inited) wait_for_sigthread (); wait_for_completion = p != myself_nowait && _my_tls.isinitialized (); @@ -697,8 +705,6 @@ sig_send (_pinfo *p, siginfo_t& si, _threadinfo *tls) goto out; } - sigproc_printf ("pid %d, signal %d, its_me %d", p->pid, si.si_signo, its_me); - if (its_me) { sendsig = myself->sendsig; @@ -727,6 +733,8 @@ sig_send (_pinfo *p, siginfo_t& si, _threadinfo *tls) pack.wakeup = NULL; } + sigproc_printf ("sendsig %p, pid %d, signal %d, its_me %d", sendsig, p->pid, si.si_signo, its_me); + sigset_t pending; if (!its_me) pack.mask = NULL; @@ -1104,6 +1112,8 @@ wait_sig (VOID *self) exception_list el; _my_tls.init_threadlist_exceptions (&el); + debug_printf ("entering ReadFile loop, readsig %p, myself->sendsig %p", + readsig, myself->sendsig); for (;;) { |