"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
-<refsect1>
+<refsect1 xmlns:xi="http://www.w3.org/2001/XInclude">
+
<title>Notes</title>
- <para id='pkgconfig-text'>These APIs are implemented as a shared
- library, which can be compiled and linked to with the
+ <para id='pkgconfig-text'>Functions described here are available as a shared
+ library, which can be compiled against and linked to with the
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>
+
+ <xi:include href="threads-aware.xml" xpointer="getenv"/>
</refsect1>
a udev context.</para>
<xi:include href="threads-aware.xml" xpointer="strict"/>
+ <xi:include href="threads-aware.xml" xpointer="getenv"/>
<para>To introspect a local device on a system, a udev device
object can be created via
</para>
</refsect1>
- <refsect1>
- <title>Notes</title>
-
- <xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
- </refsect1>
+ <xi:include href="libsystemd-pkgconfig.xml" />
<refsect1>
<title>See Also</title>
<title>Notes</title>
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
+ <xi:include href="threads-aware.xml" xpointer="getenv"/>
<para>Internally, <function>sd_listen_fds()</function> checks
whether the <varname>$LISTEN_PID</varname> environment variable
<title>Notes</title>
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
+ <xi:include href="threads-aware.xml" xpointer="getenv"/>
<para>These functions send a single datagram with the
state string as payload to the socket referenced in the
<title>Notes</title>
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
+ <xi:include href="threads-aware.xml" xpointer="getenv"/>
<para>Internally, this function parses the
<varname>$WATCHDOG_PID</varname> and
<para id="safe">All functions listed here are thread-safe and may be called in parallel from multiple threads.</para>
+<para id='getenv'>The code described here uses
+<citerefentry project='man-pages'><refentrytitle>getenv</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+which is declared to be not multi-thread-safe. This means that the code calling the functions described
+here must not call
+<citerefentry project='man-pages'><refentrytitle>setenv</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+from a parallel thread. It is recommended to only do calls to <function>setenv()</function>
+from an early phase of the program when no other threads have been started.</para>
+
</refsect1>