diff options
author | Rich Felker <dalias@aerifal.cx> | 2024-02-22 18:50:34 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2024-02-22 18:50:34 -0500 |
commit | 19563e1850808af216b1b84263bb7e83cccce506 (patch) | |
tree | 76aa0be0c61791fcae503569477efb87401cb83e /src/linux/wait4.c | |
parent | 7020e85fd768be02e7f5971f1707229407cfa1e4 (diff) | |
download | musl-19563e1850808af216b1b84263bb7e83cccce506.tar.gz |
add framework to support archs without a native wait4 syscall
this commit should make no codegen change for existing archs, but is a
prerequisite for new archs including riscv32. the wait4 emulation
backend provides both cancellable and non-cancellable variants because
waitpid is required to be a cancellation point, but all of our other
uses are not, and most of them cannot be.
based on patch by Stefan O'Rear.
Diffstat (limited to 'src/linux/wait4.c')
-rw-r--r-- | src/linux/wait4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux/wait4.c b/src/linux/wait4.c index ff2e3e66..fb08c0d0 100644 --- a/src/linux/wait4.c +++ b/src/linux/wait4.c @@ -26,7 +26,7 @@ pid_t wait4(pid_t pid, int *status, int options, struct rusage *ru) } #endif char *dest = ru ? (char *)&ru->ru_maxrss - 4*sizeof(long) : 0; - r = __syscall(SYS_wait4, pid, status, options, dest); + r = __sys_wait4(pid, status, options, dest); if (r>0 && ru && sizeof(time_t) > sizeof(long)) { long kru[4]; memcpy(kru, dest, 4*sizeof(long)); |