From 355577bc99c91363a1b7828e81086031ce75979b Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 13 Oct 2016 22:57:58 +0200 Subject: Avoid warnings if increasing a threads priority fails. * libports/manage-multithread.c (adjust_priorities): Avoid displaying error messages if we do not have the privileged processor set port by treating this error condition like EPERM. * proc/main.c (increase_priority, main): Likewise. --- libports/manage-multithread.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libports') diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c index 1588f632..576e7670 100644 --- a/libports/manage-multithread.c +++ b/libports/manage-multithread.c @@ -68,6 +68,11 @@ adjust_priority (unsigned int totalthreads) goto error_pset_priv; err = thread_max_priority (self, pset_priv, 0); + /* If we are running in an unprivileged subhurd, we got a faked + privileged processor set port. This is indeed a kind of + permission problem, and we treat it as such. */ + if (err == KERN_INVALID_ARGUMENT) + err = EPERM; if (err) goto error_max_priority; -- cgit v1.2.3