aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorNikodem Rabuliński <nikodem@rabulinski.com>2024-05-06 18:16:50 +0200
committerNikodem Rabuliński <nikodem@rabulinski.com>2024-05-07 20:43:17 +0200
commitf894cce79b05913891c8356948b5fc468a53c198 (patch)
tree7e1dd11419e6a524fc92d6cc2b0a462c86da6315 /misc
parent83a2cd0c469f02a7d5f8f8f903429702f0059f56 (diff)
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] https://github.com/apple-oss-distributions/objc4/blob/01edf1705fbc3ff78a423cd21e03dfc21eb4d780/runtime/objc-initialize.mm#L614-L636 Change-Id: Icf26010a8be655127cc130efb9c77b603a6660d0
Diffstat (limited to 'misc')
-rw-r--r--misc/launchd/org.nixos.nix-daemon.plist.in5
1 files changed, 0 insertions, 5 deletions
diff --git a/misc/launchd/org.nixos.nix-daemon.plist.in b/misc/launchd/org.nixos.nix-daemon.plist.in
index e1470cf99..664608305 100644
--- a/misc/launchd/org.nixos.nix-daemon.plist.in
+++ b/misc/launchd/org.nixos.nix-daemon.plist.in
@@ -2,11 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>EnvironmentVariables</key>
- <dict>
- <key>OBJC_DISABLE_INITIALIZE_FORK_SAFETY</key>
- <string>YES</string>
- </dict>
<key>Label</key>
<string>org.nixos.nix-daemon</string>
<key>KeepAlive</key>