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/sd_watchdog_enabled.xml | |
parent | Merge pull request #26709 from DaanDeMeyer/mkosi-drop-debug (diff) | |
download | systemd-8c51e1520ba96a0d19ddecccc57899eed2634750.tar.xz systemd-8c51e1520ba96a0d19ddecccc57899eed2634750.zip |
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/sd_watchdog_enabled.xml')
-rw-r--r-- | man/sd_watchdog_enabled.xml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/man/sd_watchdog_enabled.xml b/man/sd_watchdog_enabled.xml index 1abc2f8051..b4a59f2ad1 100644 --- a/man/sd_watchdog_enabled.xml +++ b/man/sd_watchdog_enabled.xml @@ -93,6 +93,7 @@ <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 |