[tor-commits] [tor/master] 40274: Add a changes file and make the same change with FD_CLOEXEC

nickm at torproject.org nickm at torproject.org
Mon Feb 8 19:19:54 UTC 2021


commit 0efc1e6372a38e5c50d7c1e556ce67cad0114ca7
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Feb 8 12:39:12 2021 -0500

    40274: Add a changes file and make the same change with FD_CLOEXEC
---
 changes/ticket40274  | 4 ++++
 src/test/test_util.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changes/ticket40274 b/changes/ticket40274
new file mode 100644
index 0000000000..6bcc89e19c
--- /dev/null
+++ b/changes/ticket40274
@@ -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.
diff --git a/src/test/test_util.c b/src/test/test_util.c
index c4da911f83..39685d3443 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -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) */
 



More information about the tor-commits mailing list