aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-06-20 11:19:14 +0200
committerEelco Dolstra <edolstra@gmail.com>2023-06-20 11:19:14 +0200
commita6a75ecad8c1a8bf264eb003b8c07c0fd66f80fb (patch)
tree4bd5898865672038cd668f596e82a839fedf598c /src
parent3910430b9d034c277650f4ff05a27008ede73c18 (diff)
GC server: Clear O_NONBLOCK on the right file descriptor
The bug fix in 6d30f9e6fea7d451033653f8f167aef58f7f5347 erroneously cleared O_NONBLOCK on the server rather than client FD (leaving both in an incorrect state). Fixes #8551.
Diffstat (limited to 'src')
-rw-r--r--src/libstore/gc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index 0038ec802..d023bec71 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -563,7 +563,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
/* On macOS, accepted sockets inherit the
non-blocking flag from the server socket, so
explicitly make it blocking. */
- if (fcntl(fdServer.get(), F_SETFL, fcntl(fdServer.get(), F_GETFL) & ~O_NONBLOCK) == -1)
+ if (fcntl(fdClient.get(), F_SETFL, fcntl(fdClient.get(), F_GETFL) & ~O_NONBLOCK) == -1)
abort();
while (true) {