On Linux, fork () behavior is not undefined in a multi-threaded process, but it does things that are usually not very useful.
Rather, if you fork () and do not immediately call exec (), you risk leaking unspecified resources, possibly including locks that could cause a deadlock.
, Linux ( procfs), . , , .