This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

linuxthreads question



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]