summaryrefslogtreecommitdiff
path: root/src/stdio
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2024-02-22 18:50:34 -0500
committerRich Felker <dalias@aerifal.cx>2024-02-22 18:50:34 -0500
commit19563e1850808af216b1b84263bb7e83cccce506 (patch)
tree76aa0be0c61791fcae503569477efb87401cb83e /src/stdio
parent7020e85fd768be02e7f5971f1707229407cfa1e4 (diff)
downloadmusl-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/stdio')
-rw-r--r--src/stdio/pclose.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/pclose.c b/src/stdio/pclose.c
index 080a4262..c64da405 100644
--- a/src/stdio/pclose.c
+++ b/src/stdio/pclose.c
@@ -7,7 +7,7 @@ int pclose(FILE *f)
int status, r;
pid_t pid = f->pipe_pid;
fclose(f);
- while ((r=__syscall(SYS_wait4, pid, &status, 0, 0)) == -EINTR);
+ while ((r=__sys_wait4(pid, &status, 0, 0)) == -EINTR);
if (r<0) return __syscall_ret(r);
return status;
}