mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 18:58:30 +00:00
Introduce sigtimedwait() and sigwaitinfo()
This change also invents sigcountset() and strsignal_r() and improves the quality of siginfo_t handling.
This commit is contained in:
parent
7ae556463a
commit
467a332e38
41 changed files with 887 additions and 345 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "libc/calls/state.internal.h"
|
||||
#include "libc/calls/struct/metasigaltstack.h"
|
||||
#include "libc/calls/struct/sigaction.h"
|
||||
#include "libc/calls/struct/siginfo-meta.internal.h"
|
||||
#include "libc/calls/struct/siginfo-xnu.internal.h"
|
||||
#include "libc/calls/struct/siginfo.h"
|
||||
#include "libc/calls/ucontext.h"
|
||||
|
@ -492,16 +493,7 @@ privileged void __sigenter_xnu(void *fn, int infostyle, int sig,
|
|||
}
|
||||
}
|
||||
if (xnuinfo) {
|
||||
g.si.si_signo = xnuinfo->si_signo;
|
||||
g.si.si_errno = xnuinfo->si_errno;
|
||||
g.si.si_code = xnuinfo->si_code;
|
||||
if (xnuinfo->si_pid) {
|
||||
g.si.si_pid = xnuinfo->si_pid;
|
||||
g.si.si_uid = xnuinfo->si_uid;
|
||||
} else {
|
||||
g.si.si_addr = (void *)xnuinfo->si_addr;
|
||||
}
|
||||
g.si.si_value = xnuinfo->si_value;
|
||||
__siginfo2cosmo(&g.si, (void *)xnuinfo);
|
||||
}
|
||||
((sigaction_f)(_base + rva))(sig, &g.si, &g.uc);
|
||||
if (xnuctx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue