From 6bea5dc69892cd9ff0c222474e7dd468c29dfa75 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 20 Feb 2015 18:35:05 -0500 Subject: [PATCH] map interruption of close by signal to success rather than EINPROGRESS commit 82dc1e2e783815e00a90cd3f681436a80d54a314 addressed the resolution of Austin Group issue 529, which requires close to leave the fd open when failing with EINTR, by returning the newly defined error code EINPROGRESS. this turns out to be a bad idea, though, since legacy applications not aware of the new specification are likely to interpret any error from close except EINTR as a hard failure. --- src/unistd/close.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unistd/close.c b/src/unistd/close.c index 2f1eabd7..fa3c6cab 100644 --- a/src/unistd/close.c +++ b/src/unistd/close.c @@ -14,6 +14,6 @@ int close(int fd) { fd = __aio_close(fd); int r = __syscall_cp(SYS_close, fd); - if (r == -EINTR) r = -EINPROGRESS; + if (r == -EINTR) r = 0; return __syscall_ret(r); } -- 2.25.1