From 19563e1850808af216b1b84263bb7e83cccce506 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 22 Feb 2024 18:50:34 -0500 Subject: 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. --- src/stdio/pclose.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdio') 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; } -- cgit v1.2.1