flatpak-spawn currently catches various signals by using signal() with a handler that posts an event to the main loop via g_idle_add(), but I'm fairly sure that isn't guaranteed to be async-signal safe.
Since Flatpak is Linux-specific (and therefore so is flatpak-spawn?), I think this can probably be most easily solved by using a signalfd. I have a prototype implementation, but I haven't tested it yet.
flatpak-spawn currently catches various signals by using
signal()
with a handler that posts an event to the main loop viag_idle_add()
, but I'm fairly sure that isn't guaranteed to be async-signal safe.Since Flatpak is Linux-specific (and therefore so is flatpak-spawn?), I think this can probably be most easily solved by using a
signalfd
. I have a prototype implementation, but I haven't tested it yet.