Merge pull request #8552 from edolstra/fix-eagain

GC server: Clear O_NONBLOCK on the right file descriptor
This commit is contained in:
Eelco Dolstra
2023-06-20 12:12:53 +02:00
committed by GitHub
+1 -1
View File
@@ -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) {