int sigwait(const sigset_t *set, int *sig)
{
sched::thread::wait_until([sig] { return *sig = thread_pending_signal; });
thread_pending_signal = 0;
return 0;
}
ignores the set argument and returns as soon as any signal is pending for this thread.
According to the Linux manual (https://man7.org/linux/man-pages/man3/sigwait.3.html):
"The sigwait() function suspends execution of the calling thread
until one of the signals specified in the signal set set becomes
pending. "
it should only return if the signal matches bit number set in set.
The current implementation of
sigwait()
:ignores the
set
argument and returns as soon as any signal is pending for this thread.According to the Linux manual (https://man7.org/linux/man-pages/man3/sigwait.3.html): "The sigwait() function suspends execution of the calling thread until one of the signals specified in the signal set set becomes pending. "
it should only return if the signal matches bit number set in
set
.