40274: Add a changes file and make the same change with FD_CLOEXEC

This commit is contained in:
Nick Mathewson 2021-02-08 12:39:12 -05:00
parent d21ad8a78d
commit 0efc1e6372
2 changed files with 5 additions and 1 deletions

4
changes/ticket40274 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes (compatibility):
- Fix a failure in the test cases when running on the hppa architecture,
along with a related test that might fail on other architectures in the
future. Fixes bug 40274; bugfix on 0.2.5.1-alpha.

View File

@ -5927,7 +5927,7 @@ static int
fd_is_cloexec(tor_socket_t fd)
{
int flags = fcntl(fd, F_GETFD, 0);
return (flags & FD_CLOEXEC) == FD_CLOEXEC;
return (flags & FD_CLOEXEC) != 0;
}
#endif /* defined(FD_CLOEXEC) */