This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
linuxthreads question
- To: libc-hacker@cygnus.com
- Subject: linuxthreads question
- From: Zack Weinberg <zack@rabi.phys.columbia.edu>
- Date: Sat, 11 Jul 1998 23:53:06 -0400
The pthread_attr_setschedpolicy function returns ENOTSUP if you try to
set a realtime scheduling policy and you aren't the superuser.
Shouldn't that be EPERM? Also, this check seems a bit questionable,
since (a) the kernel will enforce the restriction at pthread_create()
time, and process privileges may change between initializing the
attribute object and creating threads with it; (b) POSIX capability
support means the kernel's idea of who is allowed to do this is different.
(N.B. pthread_start_thread() doesn't bother to check for errors on the
call to __sched_setscheduler, which is just wrong.)
zw