Skip to content

threading: Prevent inheriting G_MESSAGES_DEBUG by default for launchers

Currently when either Builder is ran with G_MESSAGES_DEBUG=all, some process that rely on clean stdin/stdout/stderr for e.g. IPC over stdio don't work as expected as they'll start to spew their debug logs because they inherit G_MESSAGES_DEBUG too.

A possible solution would to make them clear their env before-hand with the subprocess launcher, but that's not always doable for various reasons (e.g. the git daemon isn't able to run because the OS can't find some libraries). So a good default solution that wouldn't require per-launcher clearing of G_MESSAGES_DEBUG is to set it to an empty string by default for all subprocess launchers, to avoid encountering this problem again in the future.

Launchers that were affected include the git client/daemon and flatpak-builder that had some problems with OStree and signals.

Fixes #1328 (closed)


Example messages:

** (flatpak-spawn:216): WARNING **: 23:32:45.608: Expected struct signalfd_siginfo of size 128, got 8
** (flatpak-spawn:209): WARNING **: 23:31:03.368: Unable to read struct signalfd_siginfo: Bad file descriptor

And the errors from the ticket above.

Merge request reports