Workaround sendfile() bug in WSL

This commit is contained in:
Justine Tunney 2022-11-02 01:38:42 -07:00
parent fc96af058b
commit f44d88707e
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
4 changed files with 59 additions and 1 deletions

View file

@ -87,6 +87,10 @@ TEST(fcntl, getfd) {
ASSERT_SYS(0, 0, fcntl(3, F_GETFD));
ASSERT_SYS(0, 4, open("/dev/null", O_RDWR | O_CLOEXEC));
ASSERT_SYS(0, FD_CLOEXEC, fcntl(4, F_GETFD));
ASSERT_SYS(0, 0, fcntl(4, F_SETFD, FD_CLOEXEC));
ASSERT_SYS(0, FD_CLOEXEC, fcntl(4, F_GETFD));
ASSERT_SYS(0, 0, fcntl(4, F_SETFD, 0));
ASSERT_SYS(0, 0, fcntl(4, F_GETFD));
ASSERT_SYS(0, 0, close(4));
ASSERT_SYS(0, 0, close(3));
}