Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, you can't depend on pthreads or pthread mutexes (they're not defined as being fork safe).

The entirety of Foundation (so presumably anything in Swift) is not fork safe either.

To be clear: "not fork safe" in this case means "severely constrained environment": e.g. you can do things liker limits, set up pipes, etc but good luck with much more. I guess morally similar to the restrictions you have in a signal handler, albeit with different restrictions.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: