]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man7/pthreads.7
user_namespaces.7: Minor rewordings of recently added text
[thirdparty/man-pages.git] / man7 / pthreads.7
CommitLineData
3616b7c0 1'\" t
c11b1abf 2.\" Copyright (c) 2005 by Michael Kerrisk <mtk.manpages@gmail.com>
3616b7c0 3.\"
93015253 4.\" %%%LICENSE_START(VERBATIM)
3616b7c0
MK
5.\" Permission is granted to make and distribute verbatim copies of this
6.\" manual provided the copyright notice and this permission notice are
7.\" preserved on all copies.
8.\"
9.\" Permission is granted to copy and distribute modified versions of this
10.\" manual under the conditions for verbatim copying, provided that the
11.\" entire resulting derived work is distributed under the terms of a
12.\" permission notice identical to this one.
23a6e651 13.\"
3616b7c0
MK
14.\" Since the Linux kernel and libraries are constantly changing, this
15.\" manual page may be incorrect or out-of-date. The author(s) assume no
16.\" responsibility for errors or omissions, or for damages resulting from
f1c71196
MK
17.\" the use of the information contained herein. The author(s) may not
18.\" have taken the same level of care in the production of this manual,
19.\" which is licensed free of charge, as they might when working
20.\" professionally.
23a6e651 21.\"
3616b7c0
MK
22.\" Formatted or processed versions of this manual, if unaccompanied by
23.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 24.\" %%%LICENSE_END
3616b7c0 25.\"
9ba01802 26.TH PTHREADS 7 2019-03-06 "Linux" "Linux Programmer's Manual"
3616b7c0
MK
27.SH NAME
28pthreads \- POSIX threads
29.SH DESCRIPTION
23a6e651 30POSIX.1 specifies a set of interfaces (functions, header files) for
3616b7c0 31threaded programming commonly known as POSIX threads, or Pthreads.
23a6e651 32A single process can contain multiple threads,
3616b7c0
MK
33all of which are executing the same program.
34These threads share the same global memory (data and heap segments),
35but each thread has its own stack (automatic variables).
a721e8b2 36.PP
3616b7c0
MK
37POSIX.1 also requires that threads share a range of other attributes
38(i.e., these attributes are process-wide rather than per-thread):
39.IP \- 3
40process ID
41.IP \- 3
42parent process ID
43.IP \- 3
44process group ID and session ID
45.IP \- 3
46controlling terminal
47.IP \- 3
48user and group IDs
49.IP \- 3
50open file descriptors
51.IP \- 3
52record locks (see
53.BR fcntl (2))
54.IP \- 3
55signal dispositions
56.IP \- 3
57file mode creation mask
58.RB ( umask (2))
59.IP \- 3
23a6e651 60current directory
3616b7c0
MK
61.RB ( chdir (2))
62and
63root directory
64.RB ( chroot (2))
65.IP \- 3
66interval timers
67.RB ( setitimer (2))
68and POSIX timers
804f03e6 69.RB ( timer_create (2))
3616b7c0
MK
70.IP \- 3
71nice value
72.RB ( setpriority (2))
73.IP \- 3
74resource limits
75.RB ( setrlimit (2))
76.IP \- 3
23a6e651 77measurements of the consumption of CPU time
3616b7c0 78.RB ( times (2))
23a6e651 79and resources
3616b7c0
MK
80.RB ( getrusage (2))
81.PP
82As well as the stack, POSIX.1 specifies that various other
83attributes are distinct for each thread, including:
84.IP \- 3
85thread ID (the
86.I pthread_t
87data type)
88.IP \- 3
89signal mask
63f6a20a 90.RB ( pthread_sigmask (3))
3616b7c0
MK
91.IP \- 3
92the
93.I errno
94variable
95.IP \- 3
23a6e651 96alternate signal stack
3616b7c0
MK
97.RB ( sigaltstack (2))
98.IP \- 3
99real-time scheduling policy and priority
25ac8173 100.RB ( sched (7))
3616b7c0
MK
101.PP
102The following Linux-specific features are also per-thread:
103.IP \- 3
104capabilities (see
105.BR capabilities (7))
106.IP \- 3
23a6e651 107CPU affinity
3616b7c0 108.RB ( sched_setaffinity (2))
73d8cece 109.SS Pthreads function return values
dad5081f 110Most pthreads functions return 0 on success, and an error number on failure.
63c22325
MK
111Note that the pthreads functions do not set
112.IR errno .
113For each of the pthreads functions that can return an error,
114POSIX.1-2001 specifies that the function can never fail with the error
115.BR EINTR .
84ee6c22
MK
116.SS Thread IDs
117Each of the threads in a process has a unique thread identifier
118(stored in the type
119.IR pthread_t ).
120This identifier is returned to the caller of
121.BR pthread_create (3),
122and a thread can obtain its own thread identifier using
123.BR pthread_self (3).
a721e8b2 124.PP
33a0ccb2 125Thread IDs are guaranteed to be unique only within a process.
0ad13546
MK
126(In all pthreads functions that accept a thread ID as an argument,
127that ID by definition refers to a thread in
128the same process as the caller.)
a721e8b2 129.PP
ccbcc0ae 130The system may reuse a thread ID after a terminated thread has been joined,
84ee6c22 131or a detached thread has terminated.
ccbcc0ae
MK
132POSIX says: "If an application attempts to use a thread ID whose
133lifetime has ended, the behavior is undefined."
73d8cece 134.SS Thread-safe functions
0d07ad30
MK
135A thread-safe function is one that can be safely
136(i.e., it will deliver the same results regardless of whether it is)
137called from multiple threads at the same time.
a721e8b2 138.PP
447cd9e7
MK
139POSIX.1-2001 and POSIX.1-2008 require that all functions specified
140in the standard shall be thread-safe,
141except for the following functions:
e646a1ba 142.PP
0d07ad30 143.in +4n
e646a1ba 144.EX
0d07ad30
MK
145asctime()
146basename()
147catgets()
148crypt()
149ctermid() if passed a non-NULL argument
150ctime()
151dbm_clearerr()
152dbm_close()
153dbm_delete()
154dbm_error()
155dbm_fetch()
156dbm_firstkey()
157dbm_nextkey()
158dbm_open()
159dbm_store()
160dirname()
161dlerror()
162drand48()
447cd9e7 163ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
0d07ad30
MK
164encrypt()
165endgrent()
166endpwent()
167endutxent()
447cd9e7 168fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
0d07ad30 169ftw()
447cd9e7 170gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
0d07ad30
MK
171getc_unlocked()
172getchar_unlocked()
173getdate()
174getenv()
175getgrent()
176getgrgid()
177getgrnam()
447cd9e7
MK
178gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
179gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
0d07ad30
MK
180gethostent()
181getlogin()
182getnetbyaddr()
183getnetbyname()
184getnetent()
185getopt()
186getprotobyname()
187getprotobynumber()
188getprotoent()
189getpwent()
190getpwnam()
191getpwuid()
192getservbyname()
193getservbyport()
194getservent()
195getutxent()
196getutxid()
197getutxline()
198gmtime()
199hcreate()
200hdestroy()
201hsearch()
202inet_ntoa()
203l64a()
204lgamma()
205lgammaf()
206lgammal()
207localeconv()
208localtime()
209lrand48()
210mrand48()
211nftw()
212nl_langinfo()
213ptsname()
214putc_unlocked()
215putchar_unlocked()
216putenv()
217pututxline()
218rand()
219readdir()
220setenv()
221setgrent()
222setkey()
223setpwent()
224setutxent()
225strerror()
447cd9e7 226strsignal() [Added in POSIX.1-2008]
0d07ad30 227strtok()
447cd9e7 228system() [Added in POSIX.1-2008]
0d07ad30
MK
229tmpnam() if passed a non-NULL argument
230ttyname()
231unsetenv()
232wcrtomb() if its final argument is NULL
233wcsrtombs() if its final argument is NULL
234wcstombs()
235wctomb()
b8302363 236.EE
0d07ad30 237.in
07451ab1
MK
238.SS Async-cancel-safe functions
239An async-cancel-safe function is one that can be safely called
240in an application where asynchronous cancelability is enabled (see
241.BR pthread_setcancelstate (3)).
a721e8b2 242.PP
07451ab1
MK
243Only the following functions are required to be async-cancel-safe by
244POSIX.1-2001 and POSIX.1-2008:
e646a1ba 245.PP
07451ab1 246.in +4n
e646a1ba 247.EX
07451ab1
MK
248pthread_cancel()
249pthread_setcancelstate()
250pthread_setcanceltype()
b8302363 251.EE
07451ab1 252.in
c634028a 253.SS Cancellation points
ffe8c4ae
MK
254POSIX.1 specifies that certain functions must,
255and certain other functions may, be cancellation points.
256If a thread is cancelable, its cancelability type is deferred,
257and a cancellation request is pending for the thread,
258then the thread is canceled when it calls a function
259that is a cancellation point.
a721e8b2 260.PP
ffe8c4ae
MK
261The following functions are required to be cancellation points by
262POSIX.1-2001 and/or POSIX.1-2008:
a721e8b2 263.PP
7aaa4c67
MK
264.\" FIXME
265.\" Document the list of all functions that are cancellation points in glibc
ffe8c4ae 266.in +4n
b8302363 267.EX
ffe8c4ae
MK
268accept()
269aio_suspend()
270clock_nanosleep()
271close()
272connect()
273creat()
274fcntl() F_SETLKW
275fdatasync()
276fsync()
277getmsg()
278getpmsg()
279lockf() F_LOCK
280mq_receive()
281mq_send()
282mq_timedreceive()
283mq_timedsend()
284msgrcv()
285msgsnd()
286msync()
287nanosleep()
288open()
289openat() [Added in POSIX.1-2008]
290pause()
291poll()
292pread()
293pselect()
294pthread_cond_timedwait()
295pthread_cond_wait()
296pthread_join()
297pthread_testcancel()
298putmsg()
299putpmsg()
300pwrite()
301read()
302readv()
303recv()
304recvfrom()
305recvmsg()
306select()
307sem_timedwait()
308sem_wait()
309send()
310sendmsg()
311sendto()
7fd4e74c 312sigpause() [POSIX.1-2001 only (moves to "may" list in POSIX.1-2008)]
ffe8c4ae
MK
313sigsuspend()
314sigtimedwait()
315sigwait()
316sigwaitinfo()
317sleep()
318system()
319tcdrain()
320usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
321wait()
322waitid()
323waitpid()
324write()
325writev()
b8302363 326.EE
ffe8c4ae 327.in
a721e8b2 328.PP
ffe8c4ae
MK
329The following functions may be cancellation points according to
330POSIX.1-2001 and/or POSIX.1-2008:
a721e8b2 331.PP
ffe8c4ae 332.in +4n
b8302363 333.EX
ffe8c4ae
MK
334access()
335asctime()
336asctime_r()
337catclose()
338catgets()
339catopen()
340chmod() [Added in POSIX.1-2008]
341chown() [Added in POSIX.1-2008]
342closedir()
343closelog()
344ctermid()
345ctime()
346ctime_r()
347dbm_close()
348dbm_delete()
349dbm_fetch()
350dbm_nextkey()
351dbm_open()
352dbm_store()
353dlclose()
354dlopen()
355dprintf() [Added in POSIX.1-2008]
356endgrent()
357endhostent()
358endnetent()
359endprotoent()
360endpwent()
361endservent()
362endutxent()
363faccessat() [Added in POSIX.1-2008]
364fchmod() [Added in POSIX.1-2008]
365fchmodat() [Added in POSIX.1-2008]
366fchown() [Added in POSIX.1-2008]
367fchownat() [Added in POSIX.1-2008]
368fclose()
369fcntl() (for any value of cmd argument)
370fflush()
371fgetc()
372fgetpos()
373fgets()
374fgetwc()
375fgetws()
376fmtmsg()
377fopen()
378fpathconf()
379fprintf()
380fputc()
381fputs()
382fputwc()
383fputws()
384fread()
385freopen()
386fscanf()
387fseek()
388fseeko()
389fsetpos()
390fstat()
391fstatat() [Added in POSIX.1-2008]
392ftell()
393ftello()
394ftw()
395futimens() [Added in POSIX.1-2008]
396fwprintf()
397fwrite()
398fwscanf()
399getaddrinfo()
400getc()
401getc_unlocked()
402getchar()
403getchar_unlocked()
404getcwd()
405getdate()
406getdelim() [Added in POSIX.1-2008]
407getgrent()
408getgrgid()
409getgrgid_r()
410getgrnam()
411getgrnam_r()
412gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]
413gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]
414gethostent()
415gethostid()
416gethostname()
417getline() [Added in POSIX.1-2008]
418getlogin()
419getlogin_r()
420getnameinfo()
421getnetbyaddr()
422getnetbyname()
423getnetent()
c7094399 424getopt() (if opterr is nonzero)
ffe8c4ae
MK
425getprotobyname()
426getprotobynumber()
427getprotoent()
428getpwent()
429getpwnam()
430getpwnam_r()
431getpwuid()
432getpwuid_r()
433gets()
434getservbyname()
435getservbyport()
436getservent()
437getutxent()
438getutxid()
439getutxline()
440getwc()
441getwchar()
442getwd() [SUSv3 only (function removed in POSIX.1-2008)]
443glob()
444iconv_close()
445iconv_open()
446ioctl()
447link()
448linkat() [Added in POSIX.1-2008]
449lio_listio() [Added in POSIX.1-2008]
450localtime()
451localtime_r()
452lockf() [Added in POSIX.1-2008]
453lseek()
454lstat()
455mkdir() [Added in POSIX.1-2008]
456mkdirat() [Added in POSIX.1-2008]
457mkdtemp() [Added in POSIX.1-2008]
458mkfifo() [Added in POSIX.1-2008]
459mkfifoat() [Added in POSIX.1-2008]
460mknod() [Added in POSIX.1-2008]
461mknodat() [Added in POSIX.1-2008]
462mkstemp()
463mktime()
464nftw()
465opendir()
466openlog()
467pathconf()
468pclose()
469perror()
470popen()
471posix_fadvise()
472posix_fallocate()
473posix_madvise()
474posix_openpt()
475posix_spawn()
476posix_spawnp()
477posix_trace_clear()
478posix_trace_close()
479posix_trace_create()
480posix_trace_create_withlog()
481posix_trace_eventtypelist_getnext_id()
482posix_trace_eventtypelist_rewind()
483posix_trace_flush()
484posix_trace_get_attr()
485posix_trace_get_filter()
486posix_trace_get_status()
487posix_trace_getnext_event()
488posix_trace_open()
489posix_trace_rewind()
490posix_trace_set_filter()
491posix_trace_shutdown()
492posix_trace_timedgetnext_event()
493posix_typed_mem_open()
494printf()
495psiginfo() [Added in POSIX.1-2008]
496psignal() [Added in POSIX.1-2008]
497pthread_rwlock_rdlock()
498pthread_rwlock_timedrdlock()
499pthread_rwlock_timedwrlock()
500pthread_rwlock_wrlock()
501putc()
502putc_unlocked()
503putchar()
504putchar_unlocked()
505puts()
506pututxline()
507putwc()
508putwchar()
509readdir()
510readdir_r()
511readlink() [Added in POSIX.1-2008]
512readlinkat() [Added in POSIX.1-2008]
513remove()
514rename()
515renameat() [Added in POSIX.1-2008]
516rewind()
517rewinddir()
518scandir() [Added in POSIX.1-2008]
519scanf()
520seekdir()
521semop()
522setgrent()
523sethostent()
524setnetent()
525setprotoent()
526setpwent()
527setservent()
528setutxent()
529sigpause() [Added in POSIX.1-2008]
530stat()
531strerror()
532strerror_r()
533strftime()
534symlink()
535symlinkat() [Added in POSIX.1-2008]
536sync()
537syslog()
538tmpfile()
539tmpnam()
540ttyname()
541ttyname_r()
542tzset()
543ungetc()
544ungetwc()
545unlink()
546unlinkat() [Added in POSIX.1-2008]
547utime() [Added in POSIX.1-2008]
548utimensat() [Added in POSIX.1-2008]
549utimes() [Added in POSIX.1-2008]
550vdprintf() [Added in POSIX.1-2008]
551vfprintf()
552vfwprintf()
553vprintf()
554vwprintf()
555wcsftime()
556wordexp()
557wprintf()
558wscanf()
b8302363 559.EE
ffe8c4ae 560.in
a721e8b2 561.PP
ffe8c4ae
MK
562An implementation may also mark other functions
563not specified in the standard as cancellation points.
564In particular, an implementation is likely to mark
c8f2dd47 565any nonstandard function that may block as a cancellation point.
ffe8c4ae
MK
566(This includes most functions that can touch files.)
567.\" So, scanning "cancellation point" comments in the glibc 2.8 header
c8f2dd47 568.\" files, it looks as though at least the following nonstandard
ffe8c4ae
MK
569.\" functions are cancellation points:
570.\" endnetgrent
571.\" endspent
572.\" epoll_pwait
573.\" epoll_wait
574.\" fcloseall
575.\" fdopendir
576.\" fflush_unlocked
577.\" fgetc_unlocked
578.\" fgetgrent
579.\" fgetgrent_r
580.\" fgetpwent
581.\" fgetpwent_r
582.\" fgets_unlocked
583.\" fgetspent
584.\" fgetspent_r
585.\" fgetwc_unlocked
586.\" fgetws_unlocked
587.\" fputc_unlocked
588.\" fputs_unlocked
589.\" fputwc_unlocked
590.\" fputws_unlocked
591.\" fread_unlocked
592.\" fwrite_unlocked
593.\" gai_suspend
594.\" getaddrinfo_a
595.\" getdate_r
596.\" getgrent_r
597.\" getgrouplist
598.\" gethostbyaddr_r
599.\" gethostbyname2
600.\" gethostbyname2_r
601.\" gethostbyname_r
602.\" gethostent_r
603.\" getnetbyaddr_r
604.\" getnetbyname_r
605.\" getnetent_r
606.\" getnetgrent
607.\" getnetgrent_r
608.\" getprotobyname_r
609.\" getprotobynumber_r
610.\" getprotoent_r
611.\" getpw
612.\" getpwent_r
613.\" getservbyname_r
614.\" getservbyport_r
615.\" getservent_r
616.\" getspent
617.\" getspent_r
618.\" getspnam
619.\" getspnam_r
620.\" getutmp
621.\" getutmpx
622.\" getw
623.\" getwc_unlocked
624.\" getwchar_unlocked
625.\" initgroups
626.\" innetgr
627.\" mkostemp
628.\" mkostemp64
629.\" mkstemp64
630.\" ppoll
631.\" pthread_timedjoin_np
632.\" putgrent
633.\" putpwent
634.\" putspent
635.\" putw
636.\" putwc_unlocked
637.\" putwchar_unlocked
638.\" rcmd
639.\" rcmd_af
640.\" rexec
641.\" rexec_af
642.\" rresvport
643.\" rresvport_af
644.\" ruserok
645.\" ruserok_af
646.\" setnetgrent
647.\" setspent
648.\" sgetspent
649.\" sgetspent_r
650.\" updwtmpx
651.\" utmpxname
652.\" vfscanf
653.\" vfwscanf
654.\" vscanf
655.\" vsyslog
656.\" vwscanf
73d8cece 657.SS Compiling on Linux
3616b7c0 658On Linux, programs that use the Pthreads API should be compiled using
4d9b6984 659.IR "cc \-pthread" .
73d8cece 660.SS Linux implementations of POSIX threads
3616b7c0
MK
661Over time, two threading implementations have been provided by
662the GNU C library on Linux:
ffe649e9 663.TP
a5e0a0e4 664.B LinuxThreads
9bc64d3e
MK
665This is the original Pthreads implementation.
666Since glibc 2.4, this implementation is no longer supported.
ffe649e9
MK
667.TP
668.BR NPTL " (Native POSIX Threads Library)"
3616b7c0
MK
669This is the modern Pthreads implementation.
670By comparison with LinuxThreads, NPTL provides closer conformance to
23a6e651 671the requirements of the POSIX.1 specification and better performance
3616b7c0 672when creating large numbers of threads.
9bc64d3e
MK
673NPTL is available since glibc 2.3.2,
674and requires features that are present in the Linux 2.6 kernel.
3616b7c0
MK
675.PP
676Both of these are so-called 1:1 implementations, meaning that each
677thread maps to a kernel scheduling entity.
3616b7c0
MK
678Both threading implementations employ the Linux
679.BR clone (2)
680system call.
d9bfdb9c 681In NPTL, thread synchronization primitives (mutexes,
d88487cc 682thread joining, and so on) are implemented using the Linux
3616b7c0
MK
683.BR futex (2)
684system call.
3616b7c0
MK
685.SS LinuxThreads
686The notable features of this implementation are the following:
687.IP \- 3
c13182ef 688In addition to the main (initial) thread,
23a6e651 689and the threads that the program creates using
63f6a20a 690.BR pthread_create (3),
3616b7c0
MK
691the implementation creates a "manager" thread.
692This thread handles thread creation and termination.
693(Problems can result if this thread is inadvertently killed.)
694.IP \- 3
695Signals are used internally by the implementation.
8bfd40a9
MK
696On Linux 2.2 and later, the first three real-time signals are used
697(see also
698.BR signal (7)).
8bd58774
MK
699On older Linux kernels,
700.B SIGUSR1
701and
702.B SIGUSR2
703are used.
23a6e651 704Applications must avoid the use of whichever set of signals is
3616b7c0
MK
705employed by the implementation.
706.IP \- 3
707Threads do not share process IDs.
708(In effect, LinuxThreads threads are implemented as processes which share
709more information than usual, but which do not share a common process ID.)
710LinuxThreads threads (including the manager thread)
711are visible as separate processes using
712.BR ps (1).
713.PP
714The LinuxThreads implementation deviates from the POSIX.1
715specification in a number of ways, including the following:
716.IP \- 3
717Calls to
718.BR getpid (2)
719return a different value in each thread.
720.IP \- 3
23a6e651 721Calls to
3616b7c0
MK
722.BR getppid (2)
723in threads other than the main thread return the process ID of the
724manager thread; instead
725.BR getppid (2)
726in these threads should return the same value as
727.BR getppid (2)
728in the main thread.
729.IP \- 3
730When one thread creates a new child process using
731.BR fork (2),
732any thread should be able to
733.BR wait (2)
734on the child.
d1a2a5de 735However, the implementation allows only the thread that
3616b7c0
MK
736created the child to
737.BR wait (2)
738on it.
739.IP \- 3
740When a thread calls
741.BR execve (2),
742all other threads are terminated (as required by POSIX.1).
743However, the resulting process has the same PID as the thread that called
744.BR execve (2):
745it should have the same PID as the main thread.
746.IP \- 3
747Threads do not share user and group IDs.
880f5b4b 748This can cause complications with set-user-ID programs and
3616b7c0
MK
749can cause failures in Pthreads functions if an application
750changes its credentials using
751.BR seteuid (2)
752or similar.
753.IP \- 3
754Threads do not share a common session ID and process group ID.
755.IP \- 3
756Threads do not share record locks created using
757.BR fcntl (2).
758.IP \- 3
759The information returned by
760.BR times (2)
761and
762.BR getrusage (2)
763is per-thread rather than process-wide.
764.IP \- 3
765Threads do not share semaphore undo values (see
766.BR semop (2)).
767.IP \- 3
768Threads do not share interval timers.
769.IP \- 3
770Threads do not share a common nice value.
771.IP \- 3
772POSIX.1 distinguishes the notions of signals that are directed
a7e7c7fc 773to the process as a whole and signals that are directed to individual
3616b7c0
MK
774threads.
775According to POSIX.1, a process-directed signal (sent using
776.BR kill (2),
777for example) should be handled by a single,
778arbitrarily selected thread within the process.
779LinuxThreads does not support the notion of process-directed signals:
33a0ccb2 780signals may be sent only to specific threads.
3616b7c0 781.IP \- 3
23a6e651
MK
782Threads have distinct alternate signal stack settings.
783However, a new thread's alternate signal stack settings
61f4934a 784are copied from the thread that created it, so that
23a6e651
MK
785the threads initially share an alternate signal stack.
786(A new thread should start with no alternate signal stack defined.
787If two threads handle signals on their shared alternate signal
788stack at the same time, unpredictable program failures are
789likely to occur.)
3616b7c0
MK
790.SS NPTL
791With NPTL, all of the threads in a process are placed
792in the same thread group;