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:
Justine Tunney 2022-10-10 07:36:07 -07:00
parent 7ae556463a
commit 467a332e38
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
41 changed files with 887 additions and 345 deletions

View file

@ -212,7 +212,7 @@ privileged static size_t kformat(char *b, size_t n, const char *fmt,
if (!kistextpointer(fmt)) fmt = "!!WONTFMT";
p = b;
f = fmt;
e = p + n;
e = p + n; // assume if n was negative e < p will be the case
for (;;) {
for (;;) {
if (!(c = *f++) || c == '%') break;
@ -502,7 +502,7 @@ privileged static size_t kformat(char *b, size_t n, const char *fmt,
case 'G':
x = va_arg(va, int);
if (_weaken(strsignal) && (s = _weaken(strsignal)(x))) {
if (_weaken(strsignal_r) && (s = _weaken(strsignal_r)(x, z))) {
goto FormatString;
} else {
goto FormatDecimal;