1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Merge pull request #8555 from NixOS/backport-8552-to-2.16-maintenance

[Backport 2.16-maintenance] GC server: Clear O_NONBLOCK on the right file descriptor
This commit is contained in:
Eelco Dolstra 2023-06-20 13:00:38 +02:00 committed by GitHub
commit 96aae7ac03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {