diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-03-07 20:25:58 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-03-08 15:32:59 +0100 |
commit | 8c51e1520ba96a0d19ddecccc57899eed2634750 (patch) | |
tree | 3fcdcfc93e934258642a476c20efc420fb58d07e /man/libsystemd-pkgconfig.xml | |
parent | 1a87882635b921df2ee26ea5c9a3e3210e2fd077 (diff) | |
download | systemd-8c51e1520ba96a0d19ddecccc57899eed2634750.tar.gz |
man: add mention that libsystemd uses getenv()
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().
Diffstat (limited to 'man/libsystemd-pkgconfig.xml')
-rw-r--r-- | man/libsystemd-pkgconfig.xml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/man/libsystemd-pkgconfig.xml b/man/libsystemd-pkgconfig.xml index e3b0634c9f..3d22870739 100644 --- a/man/libsystemd-pkgconfig.xml +++ b/man/libsystemd-pkgconfig.xml @@ -3,11 +3,14 @@ "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> |