rtkit: Allow disabling with DISABLE_RTKIT

Allow disabling real time thread, this is useful to run inside
valgrind without being killed.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
This commit is contained in:
Nicolas Dufresne 2018-10-30 16:20:39 +00:00 committed by Wim Taymans
parent a61f8cf666
commit 02e3713cf1

View file

@ -274,6 +274,9 @@ int pw_rtkit_make_realtime(struct pw_rtkit_bus *connection, pid_t thread, int pr
DBusError error;
int ret;
if (getenv("DISABLE_RTKIT"))
return -EPERM;
dbus_error_init(&error);
if (thread == 0)