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 bdc81f6dc0
commit 6e7db20bf5

View file

@ -273,6 +273,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)