mirror of
https://github.com/systemd/systemd.git
synced 2024-12-03 23:33:38 +08:00
8c51e1520b
See #26688: getenv() is not thread-safe, and could a possible source of problems when a multi-threaded program calls setenv()/putenv()/unsetenv() in parallel. It is not possible to avoid getenv() calls in general, since $PATH, $LANG, $SHELL, $USER, $HOME, $TZ may need to be accessed at any time. Add a warning to our docs so that people are aware of the issue. Closes #26688. (Real fixes will need to be in glibc and gnome-shell or other programs.) The text is added to threads-aware.xml to be included in various places. By including it in libsystemd-pkgconfig.xml, it is automatically added to all sd-* pages. The text is also included explicitly in pages for a few other functions which are call getenv().
17 lines
655 B
XML
17 lines
655 B
XML
<?xml version="1.0"?>
|
||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
||
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
||
|
||
<refsect1 xmlns:xi="http://www.w3.org/2001/XInclude">
|
||
|
||
<title>Notes</title>
|
||
|
||
<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>
|