diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-11-27 10:49:46 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-11-28 13:14:29 +0100 |
commit | 6d1f5176f257ab9a9b47ae65b528c9ab79db5b31 (patch) | |
tree | 81230a5989a4352ff784afdc0aae3c4ecd2c3350 | |
parent | 460b6f2daff3c413de4312424d38cd50c481016f (diff) |
libports: improve error reporting in adjust_priority
By using error instead of perror, the warning can be proprely
attributed to the process.
* libports/manage-multithread.c (adjust_priority): Use error instead
of perror to print the warning.
-rw-r--r-- | libports/manage-multithread.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c index d0345826..be080304 100644 --- a/libports/manage-multithread.c +++ b/libports/manage-multithread.c @@ -20,6 +20,7 @@ #include "ports.h" #include <assert.h> +#include <error.h> #include <stdio.h> #include <mach/message.h> #include <mach/thread_info.h> @@ -82,10 +83,7 @@ out: mach_port_deallocate (mach_task_self (), pset_priv); if (err && err != EPERM) - { - errno = err; - perror ("unable to adjust libports thread priority"); - } + error (0, err, "unable to adjust libports thread priority"); } void |