docs: Mention that calls after fork() must be async-signal-safe

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2958
This commit is contained in:
Philip Withnall 2023-04-28 11:00:33 +01:00
parent e7398198c5
commit 3b9fc71644

View File

@ -34,9 +34,16 @@ GLib creates a worker thread for its own purposes so GLib applications
will always have at least 2 threads.
</para>
<para>
In particular, this means that programs must only use
<ulink url="man:signal-safety(7)">async-signal-safe functions</ulink> between
calling <function>fork()</function> and <function>exec()</function>, even if
they havent explicitly spawned another thread yet.
</para>
<para>
See the sections on <link linkend="glib-Threads">threads</link> and
<link linkend="glib-Thread-Pools">threadpools</link> for GLib APIs that
<link linkend="glib-Thread-Pools">thread pools</link> for GLib APIs that
support multithreaded applications.
</para>