Fixes related to Canonical's Steam Snap app
-
graphics: Initialize wait status, etc. if exec fails
If the call to g_spawn_sync() fails (usually because execve() failed), it leaves the wait status untouched. Previously, this resulted in calling _srt_process_timeout_wait_status() on an invalid wait status and a lot of assertion failures.
In particular, Canonical's Steam Snap app has a restrictive AppArmor profile that does not allow executing timeout(1), which makes Steam's Help -> System Information fail like this.
-
library: Don't parse wait_status if g_spawn_sync() fails
Similar to the previous commit.
-
_srt_get_helper: Don't use timeout(1) when running inside a Snap app
Canonical's Snap packaging of Steam has a restrictive AppArmor profile that doesn't allow running timeout(1), resulting in all of our helper subprocesses failing.
This is a short-term solution: it will result in Help -> System Information waiting forever if one of our helper subprocesses deadlocks or otherwise hangs (for example as a result of a faulty driver).
The first two commits are genuine bug fixes.
The third is just a workaround, and I'm sure we can improve on it later, but it'll do for now.