lix/src
Moritz Angermann 0e18254aa8
Fix shutdown behavior and resource management for recursive-nix on macOS
Previously, we relied on the `shutdown()` function to terminate `accept()`
calls on a listening socket. However, this approach did not work on macOS as
the waiting `accept()` call is not considered a connected socket, resulting in
an `ENOTCONN` error. Instead, we now close the listening socket to terminate
the `accept()` call.

Additionally, we fixed a resource management issue where we set the
`daemonSocket` variable to -1, triggering resource cleanup and causing the
`stopDaemon` function to be called twice. This resulted in errors as the socket
was already closed by the time the second `stopDaemon` call was made. Instead of
setting `daemonSocket` to -1, we now release the socket using the `release()`
method on a unique pointer. This properly transfers ownership and allows for
correct resource cleanup.

These changes ensure proper behavior and resource management for the
recursive-nix feature on macOS.
2023-04-25 09:39:05 +08:00
..
build-remote Introduce SingleDrvOutputs 2023-04-15 12:51:19 -04:00
libcmd Merge pull request #6312 from obsidiansystems/keyed-build-result 2023-04-17 18:08:05 +02:00
libexpr Merge pull request #8220 from accelbread/whitelist-commit-lockfile-summary 2023-04-18 16:49:33 +02:00
libfetchers Merge remote-tracking branch 'upstream/master' into path-info 2023-04-07 20:39:04 -04:00
libmain Move initLibUtil() from initNix to initLibStore 2023-04-07 16:24:18 +02:00
libstore Fix shutdown behavior and resource management for recursive-nix on macOS 2023-04-25 09:39:05 +08:00
libutil Merge pull request #8230 from obsidiansystems/daemon-trust-override 2023-04-17 19:43:41 +02:00
nix Merge pull request #8220 from accelbread/whitelist-commit-lockfile-summary 2023-04-18 16:49:33 +02:00
nix-build Move enabled experimental feature to libutil struct 2023-03-20 11:05:22 -04:00
nix-channel Factor out the generation of the profile/channel directory 2023-03-23 10:22:42 +01:00
nix-collect-garbage Fix nix-collect-garbage -d with the new profile location 2023-03-07 13:08:04 +01:00
nix-copy-closure Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
nix-env Ensure all headers have #pragma once and are in API docs 2023-03-31 23:19:44 -04:00
nix-instantiate Revert to copyStore = true for nix-instantiate and nix-env 2022-08-23 14:40:27 +02:00
nix-store Merge pull request #6312 from obsidiansystems/keyed-build-result 2023-04-17 18:08:05 +02:00
resolve-system-dependencies Remove FormatOrString and remaining uses of format() 2023-03-02 15:57:54 +01:00
toml11 Replace cpptoml with toml11 2021-12-17 22:03:33 +01:00