source:
asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/stdio/pclose.c
Last change on this file was 352, checked in by , 6 years ago | |
---|---|
|
|
File size: 258 bytes |
Rev | Line | |
---|---|---|
[352] | 1 | #include "stdio_impl.h" |
2 | #include <errno.h> | |
3 | #include <unistd.h> | |
4 | ||
5 | int pclose(FILE *f) | |
6 | { | |
7 | int status, r; | |
8 | pid_t pid = f->pipe_pid; | |
9 | fclose(f); | |
10 | while ((r=__syscall(SYS_wait4, pid, &status, 0, 0)) == -EINTR); | |
11 | if (r<0) return __syscall_ret(r); | |
12 | return status; | |
13 | } |
Note:
See TracBrowser
for help on using the repository browser.