If I have a process which creates N threads; namely T1 .... Tn. Assume that N threads are using a lock L to synchronize among themselves. If this process calls fork()
- The new child process created has N threads or just 1 thread ? From this question, looks like its just 1 thread
- The lock L is copied to new memory (physical) location with the same value, right ?
- If answer to question (1) is that only 1 thread gets copied, what happens in new process if T1 had locked L and fork() is called from another thread T2. Will L be always locked ?