- If one thread in a program calls ,
- does the new process duplicate all threads,
- or is the new process single-threaded?
- Some UNIX systems have chosen to have two versions of ,
- one that duplicates all threads
- and another that duplicates only the thread that invoked the system call.
- Which of the two versions of to use depends on the application.
- If is called immediately after forking, then duplicating all threads is unnecessary, as the program specified in the parameters to will replace the process. In this instance, duplicating only the calling thread is appropriate.
- If, however, the separate process does not call after forking, the separate process should duplicate all threads.