mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
gsettings: Emit glib logs on stderr, not stdout
Having G_MESSAGES_DEBUG=all set in the environment (a normal thing to do when debugging Gnome troubles) causes gsettings-helper to emit a bunch of helpful gnome debug logs (which is good), but before this change they were printed on stdout rather than stderr (which was bad!). Rather than going somewhere the user could see, these log messages were being sent to the pulesaudio server and interpreted as the src/modules/stdin-util.c protocol. pulseadio waits to see a '!' message from gsettings-helper before continuing startup. With the log messages mixed in messing up the stdin-util protocol, pulseaudio never saw the '!' message, and so never completed startup. This simple fix relies on a recent glib > 2.68 (Mar 2021), so builds against old versions of glib will still have this problem! We consider this good enough until some complains otherwise. Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1222 Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/579>
This commit is contained in:
parent
1a4fb0ff63
commit
9d27317873
1 changed files with 3 additions and 0 deletions
|
|
@ -85,6 +85,9 @@ int main(int argc, char *argv[]) {
|
|||
#if !GLIB_CHECK_VERSION(2,36,0)
|
||||
g_type_init();
|
||||
#endif
|
||||
#if GLIB_CHECK_VERSION(2,68,0)
|
||||
g_log_writer_default_set_use_stderr(true);
|
||||
#endif
|
||||
|
||||
/* gsettings-data-convert copies data from GConf to GSettings. The
|
||||
* conversion is defined in the pulseaudio.convert file. The conversion is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue