Don't use the setenv function after fork
Summary:
Ideally, you should not use any non-async-signal-safe functions after fork(), because the situation after fork is very similar to the situation in the signal handler. In kcrash, we are in signal handler before fork, so we shouldn't use setenv even before fork. This patch however emulates setenv using static memory so should be safe.
Depends on D29809
Signed-off-by: Jiří Paleček <jpalecek@web.de>
Reviewers: Frameworks, dfaure
Reviewed By: dfaure
Subscribers: bruns, apol, anthonyfieroni, kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D29810