Skip to content

[th/cli-fork-safety] avoid setenv() after fork

Thomas Haller requested to merge th/cli-fork-safety into main

after fork (before exec) only functions from man signal-safety can be used. Avoid using setenv() to setup the pager.

setenv() actually cannot be used safely anywhere, because glib applications are frequently multithreaded (e.g. if they use GDBus, which can happen already before main() starts). In any case, it's also unsafe after fork.

Merge request reports

Loading