Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-02-06 21:24:11 +0300
committerChristopher Faylor <me@cgf.cx>2006-02-06 21:24:11 +0300
commit985d0e68c5f100a6996e43a08eff82981b558ec9 (patch)
tree295dce16374bf028f98c64d09bb3ef61fa89b9ad /winsup/cygwin/fhandler_termios.cc
parent125ff9be63714e51d9668a100193d1e63e645281 (diff)
Always zero all elements of siginfo_t throughout.
* cygtls.h (_cygtls::thread_context): Declare new field. (_cygtls::thread_id): Ditto. (_cygtls::signal_exit): Move into this class. (_cygtls::copy_context): Declare new function. (_cygtls::signal_debugger): Ditto. * cygtls.cc (_cygtls::init_thread): Fill out thread id field. * exceptions.cc (exception): Change message when exception info is unknown. Copy context to thread local storage. (_cygtls::handle_exceptions): Avoid double test for fault_guarded. Reflect move of signal_exit to _cygtls class. (sigpacket::process): Copy context to thread local storage. (_cygtls::signal_exit): Move to _cygtls class. Call signal_debugger to notify debugger of exiting signal (WIP). Call stackdump here (WIP). (_cygtls::copy_context): Define new function. (_cygtls::signal_debugger): Ditto. * tlsoffsets.h: Regenerate. * include/cygwin.h (_fpstate): New internal structure. (ucontext): Declare new structure (WIP). (__COPY_CONTEXT_SIZE): New define. * exceptions.cc (_cygtls::interrupt_setup): Clear "threadkill" field when there is no sigwaiting thread. (setup_handler): Move event handling into interrupt_setup.
Diffstat (limited to 'winsup/cygwin/fhandler_termios.cc')
-rw-r--r--winsup/cygwin/fhandler_termios.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index d607ea6b4..9b1098fca 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -110,10 +110,9 @@ tty_min::kill_pgrp (int sig)
{
int killself = 0;
winpids pids ((DWORD) PID_MAP_RW);
- siginfo_t si;
+ siginfo_t si = {0};
si.si_signo = sig;
si.si_code = SI_KERNEL;
- si.si_pid = si.si_uid = si.si_errno = 0;
for (unsigned i = 0; i < pids.npids; i++)
{
_pinfo *p = pids[i];
@@ -172,10 +171,9 @@ fhandler_termios::bg_check (int sig)
by another signal. */
if (WaitForSingleObject (signal_arrived, 0) != WAIT_OBJECT_0)
{
- siginfo_t si;
+ siginfo_t si = {0};
si.si_signo = sig;
si.si_code = SI_KERNEL;
- si.si_pid = si.si_uid = si.si_errno = 0;
kill_pgrp (myself->pgid, si);
}
return bg_signalled;