Bug 1858921 - Part 2: Move WasmStructObject inlinable allocation methods to new inlin...
[gecko.git] / docs / nspr / process_forking_in_nspr.rst
blobd73291edf001716252c25da8bac987e0fe1cbf76
1 Process forking in NSPR
2 =======================
4 The threads provided in NetScape Portable Runtime (NSPR) are implemented
5 using different mechanisms on the various platforms. On some platforms,
6 NSPR threads directly map one-to-one to the threads provided by the
7 platform vendor, on other platforms NSPR threads are basically
8 user-level threads within a single process (with no kernel threads) and
9 on still others NSPR threads are user-level threads implemented on top
10 of one or more kernel threads within single address space.
12 NSPR does not override the fork function and so, when fork is called
13 from the NSPR thread the results are different on the various platforms.
14 All the threads present in the parent process may be replicated in the
15 child process, only the calling thread may be replicated in the child
16 process or only the calling kernel thread may be replicated.
18 So, to be consistent across all platforms, it is suggested that when
19 using fork in a NSPR thread;
21 #. The exec function should be called in the child process.
22 #. No NSPR functions should be called in the child process before the
23    exec call is made.