summaryrefslogtreecommitdiffstats
path: root/docs/nspr/process_forking_in_nspr.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /docs/nspr/process_forking_in_nspr.rst
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/nspr/process_forking_in_nspr.rst')
-rw-r--r--docs/nspr/process_forking_in_nspr.rst23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/nspr/process_forking_in_nspr.rst b/docs/nspr/process_forking_in_nspr.rst
new file mode 100644
index 0000000000..d73291edf0
--- /dev/null
+++ b/docs/nspr/process_forking_in_nspr.rst
@@ -0,0 +1,23 @@
+Process forking in NSPR
+=======================
+
+The threads provided in NetScape Portable Runtime (NSPR) are implemented
+using different mechanisms on the various platforms. On some platforms,
+NSPR threads directly map one-to-one to the threads provided by the
+platform vendor, on other platforms NSPR threads are basically
+user-level threads within a single process (with no kernel threads) and
+on still others NSPR threads are user-level threads implemented on top
+of one or more kernel threads within single address space.
+
+NSPR does not override the fork function and so, when fork is called
+from the NSPR thread the results are different on the various platforms.
+All the threads present in the parent process may be replicated in the
+child process, only the calling thread may be replicated in the child
+process or only the calling kernel thread may be replicated.
+
+So, to be consistent across all platforms, it is suggested that when
+using fork in a NSPR thread;
+
+#. The exec function should be called in the child process.
+#. No NSPR functions should be called in the child process before the
+ exec call is made.