diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index a2c1e53..fc0c40b 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -550,7 +550,10 @@ _sigaction(int sig, const struct sigaction * act, struct sigaction * oact) if (oldact.sa_handler != SIG_DFL && oldact.sa_handler != SIG_IGN) { - oldact = _thr_sigact[sig-1].sigact; + if (act != NULL) + oldact = oldact2; + else if (oact != NULL) + oldact = _thr_sigact[sig-1].sigact; } _thr_rwl_unlock(&_thr_sigact[sig-1].lock);