musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdio/pclose.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/pclose.c')
-rw-r--r--src/stdio/pclose.c 3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stdio/pclose.c b/src/stdio/pclose.c
index c2fe7a24..7c777966 100644
--- a/src/stdio/pclose.c
+++ b/src/stdio/pclose.c
@@ -3,8 +3,9 @@
int pclose(FILE *f)
{
int status;
+ pid_t pid = f->pipe_pid;
fclose(f);
- while (waitpid(f->pipe_pid, &status, 0) == -1)
+ while (waitpid(pid, &status, 0) == -1)
if (errno != EINTR) return -1;
return status;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月25日 02:23:44 +0000

AltStyle によって変換されたページ (->オリジナル) /