mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
Explicitly make GC roots client sockets blocking
On macOS / BSD, these sockets inherit the non-blocking flag of the server soocket, which is not what we want. https://github.com/dotnet/runtime/issues/25069 https://bugs.python.org/issue7995 https://hydra.nixos.org/build/161439304
This commit is contained in:
parent
f133001dc8
commit
6d30f9e6fe
1 changed files with 6 additions and 0 deletions
|
@ -535,6 +535,12 @@ 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)
|
||||||
|
abort();
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
auto path = readLine(fdClient.get());
|
auto path = readLine(fdClient.get());
|
||||||
|
|
Loading…
Reference in a new issue