NOTES: Pthreads requires that all threads share the same UIDs and

GIDs.  But the Linux kernel maintains separate UIDs and GIDs for
every thread.  NPTL does some work to ensure that credential
changes by any thread are carried through to all POSIX threads in
a process.
This commit is contained in:
Michael Kerrisk 2008-04-29 21:53:08 +00:00
parent bb1abbbd18
commit 6923f52c33
1 changed files with 11 additions and 1 deletions

View File

@ -231,7 +231,17 @@ are specified in POSIX.1-2001.
The real, effective, and saved set IDs are specified in POSIX.1-2001.
The file system IDs are a Linux extension.
.SH NOTES
Credentials are shared by all of the threads in a process.
The POSIX threads specification requires that
credentials are shared by all of the threads in a process.
However, at the kernel level, Linux maintains separate user and group
credentials for each thread.
The NPTL threading implementation does some work to ensure
that any change to user or group credentials
(e.g., calls to
.BR setuid (2),
.BR setresuid(2),
etc.)
is carried through to all of the POSIX threads in a process.
.SH "SEE ALSO"
.BR csh (1),
.BR bash (1),