I checked the man page for the fork. It doesn't mention anything about the thread safety of this function. Where can I check it or how to determine it?
Asked
Active
Viewed 40 times
1
-
Yes, no. Please explain what you understand by 'thread-safe' in the context of fork. – Martin James Dec 12 '20 at 20:05
-
Consider one thread locking the memory allocator within a call to `malloc` at the same time another's thread call to `fork` spawns the new process. The question is - how does the new process unlock the memory allocator (`malloc`) if no thread owns the lock? – Myst Dec 12 '20 at 20:29
-
If I look at https://www.gnu.org/software/libc/manual/html_node/Creating-a-Process.html It mentions ** MT-Safe**. Does that mean it is thread safe? – pensee Dec 12 '20 at 20:43