71b40fc76b
Doing any kind of memory allocation calls between fork() and exec() in the child process is prone to deadlocks and explosions. In general, only async-signal-safe functions are safe there. Move the config access to the parent process before fork() to avoid problems. See also: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/941#note_1457053 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>