about summary refs log tree commit diff
path: root/src/unistd/close.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unistd/close.c')
-rw-r--r--src/unistd/close.c5
1 files changed, 4 insertions, 1 deletions
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);
 }