This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: linuxthreads question
- To: drepper@cygnus.com
- Subject: Re: linuxthreads question
- From: tb@MIT.EDU (Thomas Bushnell, n/BSG)
- Date: Wed, 15 Jul 1998 10:29:13 -0400
- Cc: roland@frob.com, zack@rabi.phys.columbia.edu, libc-hacker@cygnus.com
From: Ulrich Drepper <drepper@cygnus.com>
Date: 14 Jul 1998 20:10:31 -0700
The problem is that this is really a situation which is not (yet)
supported. No user beside root so far can change the priority of the
threads but this is no general problem, it's because we still have no
complete capability implementation. The kernel returns an error code
which says EPERM but this error message really means that "changing
priorities is not supported for normal users". It's not supported
since the detailed methods to control this are missing. It does not
fail because there is a general permission problem and normal users
are never allowed to do this.
This is still an EPERM case. For example, on BSD it is not allowed
for an ordinary user to chown a file away; the reason for this is to
maintain the integrity of the quota mechanism. One could say that
therefore the quota mechanism does not support chown for non-root, and
that therefore the chown should be EOFNOTSUPP, but that's a stretch.
OPNOTSUPP is for "this facility is just not going to work" not "I have
some restriction".
Anyhow, I don't think pthread_attr_setschedpolicy should provide this
error code. But fixing the pthread_create code is really hard.
Exactly. pthread_attr_* should in general do no error codes at all.
Then if you do a pthread_create with a scheduling policy set and it
isn't supported (for the permission reason, say) then pthread_create
returns the error. I was in the balloting group; this is exactly the
intention of the standard.