Miah Johnson on Nostr: Today I learned about this magic variable in MacOS. export ...
Today I learned about this magic variable in MacOS.
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
If you don't set this, there is a good chance your python code will crash if you do a fork(), some stuff, exec().
objc[53913]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
I learned about this with help from a person on slack named 'Fabulous Nuggets', and found more details on this blog from 2018.
https://wefearchange.org/2018/11/forkmacos.rst.htmlPublished at
2023-09-18 17:15:58Event JSON
{
"id": "2242ed154cd16e544a0021ce79327d9e26f76d18752e1569ce37bae00f9b165d",
"pubkey": "86228fcc28e002bbb603486fd0c5e37470acccf1200283a121f1db7fd75efd79",
"created_at": 1695057358,
"kind": 1,
"tags": [
[
"proxy",
"https://hachyderm.io/users/miah/statuses/111087279016873581",
"activitypub"
]
],
"content": "Today I learned about this magic variable in MacOS.\n\nexport OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES\n\nIf you don't set this, there is a good chance your python code will crash if you do a fork(), some stuff, exec().\n\nobjc[53913]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.\n\nI learned about this with help from a person on slack named 'Fabulous Nuggets', and found more details on this blog from 2018.\n\nhttps://wefearchange.org/2018/11/forkmacos.rst.html",
"sig": "598e6909df6b93baa33cbede250252cae68d3f578efc53f3d514ba410983f9a6c838264ac9eb3925a09a95cad1054248c9773f094c633c1126773a1f34e29d9f"
}