diff options
Diffstat (limited to 'libc/stdio/popen.c')
-rw-r--r-- | libc/stdio/popen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c index ddf881899..2fd1fa832 100644 --- a/libc/stdio/popen.c +++ b/libc/stdio/popen.c @@ -64,7 +64,8 @@ int pclose(FILE *fd) if (fclose(fd) != 0) { return EOF; } - wait(&waitstat); + if (wait(&waitstat) == -1) + return -1; return waitstat; } |