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 <firstname.lastname@example.org>