aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-06-20 12:12:53 +0200
committerGitHub <noreply@github.com>2023-06-20 12:12:53 +0200
commitb1352700c426796541ecb10f07ce73baa40a0957 (patch)
treee960c4cf2d2f2ad39c28e3b9f5e1f9d640ea89f5
parent6a74e88f51388d13ef2284e5a9a6043f235dba2c (diff)
parenta6a75ecad8c1a8bf264eb003b8c07c0fd66f80fb (diff)
Merge pull request #8552 from edolstra/fix-eagain
GC server: Clear O_NONBLOCK on the right file descriptor
-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 3c9544017..20720fb99 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -568,7 +568,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) {