mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 03:38:31 +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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue