GThread: Don't g_error() if setting the thread scheduler settings fails

Instead only do a g_critical(). This is something that has to be fixed
one way or another, but a g_critical() is less disruptive and makes sure
that code that worked in previous GLib versions still works as bad as
before.

Fixes https://gitlab.gnome.org/GNOME/glib/issues/2039
This commit is contained in:
Sebastian Dröge 2020-02-20 17:43:49 +02:00
parent 73d557981d
commit 965061797d

View File

@ -1248,7 +1248,7 @@ linux_pthread_proxy (void *data)
res = syscall (SYS_sched_setattr, tid, thread->scheduler_settings->attr, flags); res = syscall (SYS_sched_setattr, tid, thread->scheduler_settings->attr, flags);
errsv = errno; errsv = errno;
if (res == -1) if (res == -1)
g_error ("Failed to set scheduler settings: %s", g_strerror (errsv)); g_critical ("Failed to set scheduler settings: %s", g_strerror (errsv));
} }
return thread->proxy (data); return thread->proxy (data);