summaryrefslogtreecommitdiff
path: root/libc/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio')
-rw-r--r--libc/stdio/popen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c
index dfbfd9611..40a6ddac1 100644
--- a/libc/stdio/popen.c
+++ b/libc/stdio/popen.c
@@ -129,7 +129,7 @@ FILE *popen(const char *command, const char *modes)
int pclose(FILE *stream)
{
struct popen_list_item *p;
- int stat;
+ int status;
pid_t pid;
/* First, find the list entry corresponding to stream and remove it
@@ -164,8 +164,8 @@ int pclose(FILE *stream)
/* SUSv3 specificly requires that pclose not return before the child
* terminates, in order to disallow pclose from returning on EINTR. */
do {
- if (waitpid(pid, &stat, 0) >= 0) {
- return stat;
+ if (waitpid(pid, &status, 0) >= 0) {
+ return status;
}
if (errno != EINTR) {
break;