summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_sigwait.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-06-30 06:16:50 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-06-30 06:16:50 +0000
commit67068d48167e3506e10a16d9e61d6362db843c40 (patch)
tree8e286fb7c1767e570cc48127627a5390c1162482 /lib/libpthread/thread/thr_sigwait.c
parentcfd592ad57fd4c3adbcdfbe51b5994322683ce9c (diff)
downloadFreeBSD-src-67068d48167e3506e10a16d9e61d6362db843c40.zip
FreeBSD-src-67068d48167e3506e10a16d9e61d6362db843c40.tar.gz
Because there are only _SIG_MAXSIG elements in thread siginfo array,
use [signal number - 1] as subscript to access the array.
Diffstat (limited to 'lib/libpthread/thread/thr_sigwait.c')
-rw-r--r--lib/libpthread/thread/thr_sigwait.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_sigwait.c b/lib/libpthread/thread/thr_sigwait.c
index 4b9cb69..5389c8a 100644
--- a/lib/libpthread/thread/thr_sigwait.c
+++ b/lib/libpthread/thread/thr_sigwait.c
@@ -113,7 +113,7 @@ lib_sigtimedwait(const sigset_t *set, siginfo_t *info,
if (SIGISMEMBER(waitset, i) &&
SIGISMEMBER(curthread->sigpend, i)) {
SIGDELSET(curthread->sigpend, i);
- *info = curthread->siginfo[i];
+ *info = curthread->siginfo[i - 1];
KSE_SCHED_UNLOCK(curthread->kse,
curthread->kseg);
_kse_critical_leave(crit);
OpenPOWER on IntegriCloud