The waybar process does not exit instantaneously.
Signals may be recevied after main has started freeing resources.
When a worker thread is in `fgets` this time window can last forever.
An easy way to duplicate the crash is pressing ^C twice with a Hyprland module.
Thread 1 "waybar" received signal SIGSEGV, Segmentation fault.
spdlog::sinks::sink::should_log (this=0x5f620b542ca5,
msg_level=spdlog::level::info)
at /usr/src/debug/spdlog/spdlog-1.14.1/include/spdlog/sinks/sink-inl.h:13
13 return msg_level >= level_.load(std::memory_order_relaxed);
(gdb) p $_siginfo._sifields._sigfault.si_addr
$1 = (void *) 0x5f620b542cad
When forkExec is called it begins to ignore all SIGCHLD signals for
the rest of the progam's execution so that they are automatically
reaped. However, this means that subsequent waitpid calls in the exec
function will always fail. So instead handle SIGCHLD by reaping any
processes created by forkExec and ignoring all others so that they can be
handled directly by the exec function.