author | Rich Felker <dalias@aerifal.cx> | 2012年09月24日 22:39:08 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012年09月24日 22:39:08 -0400 |
commit | 82dc1e2e783815e00a90cd3f681436a80d54a314 (patch) | |
tree | 4cf63d5f1c3e10255033200531ca214eca3aa7fe /src | |
parent | 4b49060da09b37e36ae08b49499c4a53b4f53890 (diff) | |
download | musl-82dc1e2e783815e00a90cd3f681436a80d54a314.tar.gz |
-rw-r--r-- | src/unistd/close.c | 5 |
diff --git a/src/unistd/close.c b/src/unistd/close.c index 728d729b..e8f813d6 100644 --- a/src/unistd/close.c +++ b/src/unistd/close.c @@ -1,8 +1,11 @@ #include <unistd.h> +#include <errno.h> #include "syscall.h" #include "libc.h" int close(int fd) { - return syscall_cp(SYS_close, fd); + int r = __syscall_cp(SYS_close, fd); + if (r == -EINTR) r = -EINPROGRESS; + return __syscall_ret(r); } |