mirror of
git://git.musl-libc.org/musl
synced 2025-02-06 14:02:10 +00:00
map interruption of close by signal to success rather than EINPROGRESS
commit 82dc1e2e78
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.
This commit is contained in:
parent
36d8e97223
commit
6bea5dc698
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user