1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-10 02:51:02 +01:00
nix/src
Nikodem Rabuliński 8105307f0f Always initialize curl in parent process on darwin
Because of an objc quirk[1], calling curl_global_init for the first time
after fork() will always result in a crash.
Up until now the solution has been to set
OBJC_DISABLE_INITIALIZE_FORK_SAFETY for every nix process to ignore
that error.
This is less than ideal because we were setting it in package.nix,
which meant that running nix tests locally would fail because
that variable was not set.
Instead of working around that error we address it at the core -
by calling curl_global_init inside initLibStore, which should mean
curl will already have been initialized by the time we try to do so in
a forked process.

[1] 01edf1705f/runtime/objc-initialize.mm (L614-L636)

(cherry-picked and adapted from c7d97802e4)
2024-09-18 14:29:26 +02:00
..
build-remote build-remote: only allocate storeUri once 2024-07-25 14:04:03 +02:00
external-api-docs Deduplicate our many package.nix a bit (#11175) 2024-07-25 03:12:39 +00:00
internal-api-docs Deduplicate our many package.nix a bit (#11175) 2024-07-25 03:12:39 +00:00
libcmd Merge pull request #11378 from Mic92/nix-dir-errors 2024-09-11 13:10:28 -04:00
libexpr Use envvars NIX_CACHE_HOME, NIX_CONFIG_HOME, NIX_DATA_HOME, NIX_STATE_HOME if defined (#11351) 2024-09-11 10:36:46 +00:00
libexpr-c Merge pull request #11188 from lf-/jade/kill-int-overflow 2024-08-11 04:24:16 +02:00
libfetchers Merge pull request #11330 from NixOS/packfile 2024-09-16 14:42:59 +02:00
libflake Formatting 2024-09-11 20:35:04 +02:00
libmain fix: Avoid deadlock in ProgressBar::redraw() 2024-09-08 11:44:24 +02:00
libmain-c Deduplicate our many package.nix a bit (#11175) 2024-07-25 03:12:39 +00:00
libstore Always initialize curl in parent process on darwin 2024-09-18 14:29:26 +02:00
libstore-c Add nix_store_copy_closure to libstore-c 2024-08-23 12:49:39 +03:00
libutil Merge pull request #8766 from brianmcgee/fix/base64-decode-error-message 2024-09-17 09:59:15 -04:00
libutil-c Merge pull request #10910 from hercules-ci/c-api-nix_clear_err 2024-08-26 10:50:26 -04:00
nix nix derivation add: Remove reference to "installable" 2024-09-17 12:37:33 +02:00
nix-build fix: check to see if there are any lines before 2024-08-18 22:35:54 -04:00
nix-channel Don't use OS_STR in nix-channel.cc 2024-08-18 18:27:20 +05:30
nix-collect-garbage More std::filesystem for nix-collect-garbage 2024-08-26 17:29:23 -04:00
nix-copy-closure Restrict some code to StoreDirConfig 2023-11-04 19:05:36 -04:00
nix-env Use std::strong_ordering for version comparison 2024-07-30 18:13:05 -07:00
nix-instantiate No global settings in libnixfetchers and libnixflake 2024-07-12 08:50:28 -04:00
nix-store Make abort() call sites log first 2024-07-24 16:52:04 +02:00
perl Move NIX_BIN_DIR and all logic using it to the Nix executable itself 2024-08-12 12:29:17 -04:00
nix-expr-test-support Put back files for now 2024-07-02 09:26:22 -04:00
nix-expr-tests Put back files for now 2024-07-02 09:26:22 -04:00
nix-fetchers-tests Put back files for now 2024-07-02 09:26:22 -04:00
nix-flake-tests Put back files for now 2024-07-02 09:26:22 -04:00
nix-functional-tests Build Functional tests with Meson 2024-08-14 15:35:40 -04:00
nix-store-test-support Put back files for now 2024-07-02 09:26:22 -04:00
nix-store-tests Put back files for now 2024-07-02 09:26:22 -04:00
nix-util-test-support Put back files for now 2024-07-02 09:26:22 -04:00
nix-util-tests Put back files for now 2024-07-02 09:26:22 -04:00