diff options
author | Christopher Faylor <me@cgf.cx> | 2006-02-06 18:24:11 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-02-06 18:24:11 +0000 |
commit | 985d0e68c5f100a6996e43a08eff82981b558ec9 (patch) | |
tree | 295dce16374bf028f98c64d09bb3ef61fa89b9ad /winsup/cygwin/signal.cc | |
parent | 125ff9be63714e51d9668a100193d1e63e645281 (diff) | |
download | newlib-985d0e68c5f100a6996e43a08eff82981b558ec9.zip newlib-985d0e68c5f100a6996e43a08eff82981b558ec9.tar.gz newlib-985d0e68c5f100a6996e43a08eff82981b558ec9.tar.bz2 |
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/signal.cc')
-rw-r--r-- | winsup/cygwin/signal.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 09e8eee..1055b5f 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -209,10 +209,9 @@ _pinfo::kill (siginfo_t& si) } else if (sendSIGCONT) { - siginfo_t si2; + siginfo_t si2 = {0}; si2.si_signo = SIGCONT; si2.si_code = SI_KERNEL; - si2.si_pid = si2.si_uid = si2.si_errno = 0; sig_send (this, si2); } @@ -251,20 +250,18 @@ kill0 (pid_t pid, siginfo_t& si) int killsys (pid_t pid, int sig) { - 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; return kill0 (pid, si); } int kill (pid_t pid, int sig) { - siginfo_t si; + siginfo_t si = {0}; si.si_signo = sig; si.si_code = SI_USER; - si.si_pid = si.si_uid = si.si_errno = 0; return kill0 (pid, si); } @@ -538,7 +535,7 @@ sigwaitinfo (const sigset_t *set, siginfo_t *info) extern "C" int sigqueue (pid_t pid, int sig, const union sigval value) { - siginfo_t si; + siginfo_t si = {0}; pinfo dest (pid); if (!dest) { @@ -547,7 +544,6 @@ sigqueue (pid_t pid, int sig, const union sigval value) } si.si_signo = sig; si.si_code = SI_QUEUE; - si.si_pid = si.si_uid = si.si_errno = 0; si.si_value = value; return sig_send (dest, si); } |