Open
Description
I was writing a shell as an example for nix, and I realised that #555 makes a really good point: the code that runs in the child after fork(2)
must not allocate if there is more than one thread. I don't know if fork
should necessarily be made unsafe, but certainly we need to document better what is ok to do afterwards.
This is somewhat related to #90 in that there's an execution context where only limited operations should be performed. Ideally nix would force only correct usage, but at the same time there's a lot of value of staying close to the libc definitions of functions. (#190 seems connected here too.)