BUGS
In the obsolete LinuxThreads implementation, each of the threads in a
process has a different process ID. This is in violation of the POSIX
threads specification, and is the source of many other non-conformances
to the standard; see pthreads(7).
1.是的
2.个人偏好,程序员看十六进制爽一些
man pthread,拉到最后看bug
THREADS(7) Linux Programmer's Manual PTHREADS(7)
NAME
pthreads - POSIX threads
DESCRIPTION
POSIX.1 specifies a set of interfaces (functions, header files) for
threaded programming commonly known as POSIX threads, or Pthreads. A
single process can contain multiple threads, all of which are executing
the same program. These threads share the same global memory (data and
heap segments), but each thread has its own stack (automatic vari‐
ables).
POSIX.1 also requires that threads share a range of other attributes
(i.e., these attributes are process-wide rather than per-thread):
- process ID
- parent process ID
- process group ID and session ID
- controlling terminal
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |