OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.37.
[linuxjm/LDP_man-pages.git] / po4a / man2 / po / man2.pot
index 148e855..59991f2 100644 (file)
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2012-03-19 23:50+0900\n"
+"POT-Creation-Date: 2012-03-22 04:25+0900\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -29,19 +29,19 @@ msgid "2007-12-26"
 msgstr ""
 
 #. type: TH
-#: build/C/man2/arch_prctl.2:24 build/C/man2/futex.2:17 build/C/man2/kexec_load.2:25 build/C/man2/lookup_dcookie.2:27 build/C/man2/modify_ldt.2:25 build/C/man2/nfsservctl.2:8 build/C/man2/outb.2:28 build/C/man2/pciconfig_read.2:5 build/C/man2/personality.2:30 build/C/man2/pivot_root.2:7 build/C/man2/ptrace.2:45 build/C/man2/quotactl.2:25 build/C/man2/sendfile.2:15 build/C/man2/set_tid_address.2:23 build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vm86.2:26 build/C/man2/vmsplice.2:26
+#: build/C/man2/arch_prctl.2:24 build/C/man2/futex.2:17 build/C/man2/kexec_load.2:25 build/C/man2/lookup_dcookie.2:27 build/C/man2/modify_ldt.2:25 build/C/man2/nfsservctl.2:8 build/C/man2/outb.2:28 build/C/man2/pciconfig_read.2:5 build/C/man2/personality.2:30 build/C/man2/pivot_root.2:7 build/C/man2/ptrace.2:48 build/C/man2/quotactl.2:25 build/C/man2/sendfile.2:15 build/C/man2/set_tid_address.2:23 build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vm86.2:26 build/C/man2/vmsplice.2:26
 #, no-wrap
 msgid "Linux"
 msgstr ""
 
 #. type: TH
-#: build/C/man2/arch_prctl.2:24 build/C/man2/futex.2:17 build/C/man2/kexec_load.2:25 build/C/man2/lookup_dcookie.2:27 build/C/man2/modify_ldt.2:25 build/C/man2/nfsservctl.2:8 build/C/man2/outb.2:28 build/C/man2/pciconfig_read.2:5 build/C/man2/personality.2:30 build/C/man2/pivot_root.2:7 build/C/man2/ptrace.2:45 build/C/man2/quotactl.2:25 build/C/man2/sendfile.2:15 build/C/man2/set_tid_address.2:23 build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vm86.2:26 build/C/man2/vmsplice.2:26
+#: build/C/man2/arch_prctl.2:24 build/C/man2/futex.2:17 build/C/man2/kexec_load.2:25 build/C/man2/lookup_dcookie.2:27 build/C/man2/modify_ldt.2:25 build/C/man2/nfsservctl.2:8 build/C/man2/outb.2:28 build/C/man2/pciconfig_read.2:5 build/C/man2/personality.2:30 build/C/man2/pivot_root.2:7 build/C/man2/ptrace.2:48 build/C/man2/quotactl.2:25 build/C/man2/sendfile.2:15 build/C/man2/set_tid_address.2:23 build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vm86.2:26 build/C/man2/vmsplice.2:26
 #, no-wrap
 msgid "Linux Programmer's Manual"
 msgstr ""
 
 #. type: SH
-#: build/C/man2/arch_prctl.2:25 build/C/man2/futex.2:18 build/C/man2/kexec_load.2:26 build/C/man2/lookup_dcookie.2:28 build/C/man2/modify_ldt.2:26 build/C/man2/nfsservctl.2:9 build/C/man2/outb.2:29 build/C/man2/pciconfig_read.2:6 build/C/man2/personality.2:31 build/C/man2/pivot_root.2:8 build/C/man2/ptrace.2:46 build/C/man2/quotactl.2:26 build/C/man2/sendfile.2:16 build/C/man2/set_tid_address.2:24 build/C/man2/splice.2:27 build/C/man2/tee.2:27 build/C/man2/vm86.2:27 build/C/man2/vmsplice.2:27
+#: build/C/man2/arch_prctl.2:25 build/C/man2/futex.2:18 build/C/man2/kexec_load.2:26 build/C/man2/lookup_dcookie.2:28 build/C/man2/modify_ldt.2:26 build/C/man2/nfsservctl.2:9 build/C/man2/outb.2:29 build/C/man2/pciconfig_read.2:6 build/C/man2/personality.2:31 build/C/man2/pivot_root.2:8 build/C/man2/ptrace.2:49 build/C/man2/quotactl.2:26 build/C/man2/sendfile.2:16 build/C/man2/set_tid_address.2:24 build/C/man2/splice.2:27 build/C/man2/tee.2:27 build/C/man2/vm86.2:27 build/C/man2/vmsplice.2:27
 #, no-wrap
 msgid "NAME"
 msgstr ""
@@ -52,7 +52,7 @@ msgid "arch_prctl - set architecture-specific thread state"
 msgstr ""
 
 #. type: SH
-#: build/C/man2/arch_prctl.2:27 build/C/man2/futex.2:20 build/C/man2/kexec_load.2:28 build/C/man2/lookup_dcookie.2:30 build/C/man2/modify_ldt.2:28 build/C/man2/nfsservctl.2:11 build/C/man2/pciconfig_read.2:8 build/C/man2/personality.2:33 build/C/man2/pivot_root.2:10 build/C/man2/ptrace.2:48 build/C/man2/quotactl.2:28 build/C/man2/sendfile.2:18 build/C/man2/set_tid_address.2:26 build/C/man2/splice.2:29 build/C/man2/tee.2:29 build/C/man2/vm86.2:29 build/C/man2/vmsplice.2:29
+#: build/C/man2/arch_prctl.2:27 build/C/man2/futex.2:20 build/C/man2/kexec_load.2:28 build/C/man2/lookup_dcookie.2:30 build/C/man2/modify_ldt.2:28 build/C/man2/nfsservctl.2:11 build/C/man2/pciconfig_read.2:8 build/C/man2/personality.2:33 build/C/man2/pivot_root.2:10 build/C/man2/ptrace.2:51 build/C/man2/quotactl.2:28 build/C/man2/sendfile.2:18 build/C/man2/set_tid_address.2:26 build/C/man2/splice.2:29 build/C/man2/tee.2:29 build/C/man2/vm86.2:29 build/C/man2/vmsplice.2:29
 #, no-wrap
 msgid "SYNOPSIS"
 msgstr ""
@@ -79,7 +79,7 @@ msgstr ""
 
 #.  Return type was long before glibc 2.7
 #. type: SH
-#: build/C/man2/arch_prctl.2:36 build/C/man2/futex.2:32 build/C/man2/kexec_load.2:35 build/C/man2/lookup_dcookie.2:32 build/C/man2/modify_ldt.2:34 build/C/man2/nfsservctl.2:18 build/C/man2/outb.2:33 build/C/man2/pciconfig_read.2:19 build/C/man2/personality.2:37 build/C/man2/pivot_root.2:12 build/C/man2/ptrace.2:55 build/C/man2/quotactl.2:36 build/C/man2/sendfile.2:43 build/C/man2/set_tid_address.2:32 build/C/man2/splice.2:39 build/C/man2/tee.2:38 build/C/man2/vm86.2:35 build/C/man2/vmsplice.2:39
+#: build/C/man2/arch_prctl.2:36 build/C/man2/futex.2:32 build/C/man2/kexec_load.2:35 build/C/man2/lookup_dcookie.2:32 build/C/man2/modify_ldt.2:34 build/C/man2/nfsservctl.2:18 build/C/man2/outb.2:33 build/C/man2/pciconfig_read.2:19 build/C/man2/personality.2:37 build/C/man2/pivot_root.2:12 build/C/man2/ptrace.2:58 build/C/man2/quotactl.2:36 build/C/man2/sendfile.2:43 build/C/man2/set_tid_address.2:32 build/C/man2/splice.2:39 build/C/man2/tee.2:38 build/C/man2/vm86.2:35 build/C/man2/vmsplice.2:39
 #, no-wrap
 msgid "DESCRIPTION"
 msgstr ""
@@ -147,7 +147,7 @@ msgid ""
 msgstr ""
 
 #. type: SH
-#: build/C/man2/arch_prctl.2:81 build/C/man2/futex.2:173 build/C/man2/kexec_load.2:110 build/C/man2/lookup_dcookie.2:43 build/C/man2/modify_ldt.2:96 build/C/man2/nfsservctl.2:48 build/C/man2/pciconfig_read.2:47 build/C/man2/personality.2:55 build/C/man2/pivot_root.2:95 build/C/man2/ptrace.2:399 build/C/man2/sendfile.2:104 build/C/man2/set_tid_address.2:80 build/C/man2/splice.2:127 build/C/man2/tee.2:85 build/C/man2/vm86.2:52 build/C/man2/vmsplice.2:113
+#: build/C/man2/arch_prctl.2:81 build/C/man2/futex.2:173 build/C/man2/kexec_load.2:110 build/C/man2/lookup_dcookie.2:43 build/C/man2/modify_ldt.2:96 build/C/man2/nfsservctl.2:51 build/C/man2/pciconfig_read.2:47 build/C/man2/personality.2:55 build/C/man2/pivot_root.2:95 build/C/man2/ptrace.2:1566 build/C/man2/sendfile.2:104 build/C/man2/set_tid_address.2:80 build/C/man2/splice.2:127 build/C/man2/tee.2:85 build/C/man2/vm86.2:52 build/C/man2/vmsplice.2:113
 #, no-wrap
 msgid "RETURN VALUE"
 msgstr ""
@@ -160,13 +160,13 @@ msgid ""
 msgstr ""
 
 #. type: SH
-#: build/C/man2/arch_prctl.2:87 build/C/man2/futex.2:210 build/C/man2/kexec_load.2:117 build/C/man2/lookup_dcookie.2:50 build/C/man2/modify_ldt.2:106 build/C/man2/pciconfig_read.2:74 build/C/man2/personality.2:62 build/C/man2/pivot_root.2:99 build/C/man2/ptrace.2:412 build/C/man2/quotactl.2:425 build/C/man2/sendfile.2:111 build/C/man2/set_tid_address.2:83 build/C/man2/splice.2:142 build/C/man2/tee.2:100 build/C/man2/vm86.2:57 build/C/man2/vmsplice.2:122
+#: build/C/man2/arch_prctl.2:87 build/C/man2/futex.2:210 build/C/man2/kexec_load.2:117 build/C/man2/lookup_dcookie.2:50 build/C/man2/modify_ldt.2:106 build/C/man2/pciconfig_read.2:74 build/C/man2/personality.2:62 build/C/man2/pivot_root.2:99 build/C/man2/ptrace.2:1580 build/C/man2/quotactl.2:425 build/C/man2/sendfile.2:111 build/C/man2/set_tid_address.2:83 build/C/man2/splice.2:142 build/C/man2/tee.2:100 build/C/man2/vm86.2:57 build/C/man2/vmsplice.2:122
 #, no-wrap
 msgid "ERRORS"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/arch_prctl.2:88 build/C/man2/futex.2:222 build/C/man2/lookup_dcookie.2:51 build/C/man2/modify_ldt.2:107 build/C/man2/ptrace.2:417 build/C/man2/quotactl.2:426 build/C/man2/sendfile.2:121 build/C/man2/vm86.2:58
+#: build/C/man2/arch_prctl.2:88 build/C/man2/futex.2:222 build/C/man2/lookup_dcookie.2:51 build/C/man2/modify_ldt.2:107 build/C/man2/ptrace.2:1584 build/C/man2/quotactl.2:426 build/C/man2/sendfile.2:121 build/C/man2/vm86.2:58
 #, no-wrap
 msgid "B<EFAULT>"
 msgstr ""
@@ -179,7 +179,7 @@ msgid ""
 msgstr ""
 
 #. type: TP
-#: build/C/man2/arch_prctl.2:92 build/C/man2/futex.2:227 build/C/man2/kexec_load.2:122 build/C/man2/lookup_dcookie.2:54 build/C/man2/modify_ldt.2:111 build/C/man2/pciconfig_read.2:75 build/C/man2/personality.2:63 build/C/man2/pivot_root.2:108 build/C/man2/ptrace.2:428 build/C/man2/quotactl.2:432 build/C/man2/quotactl.2:499 build/C/man2/sendfile.2:124 build/C/man2/splice.2:147 build/C/man2/tee.2:101 build/C/man2/vmsplice.2:127
+#: build/C/man2/arch_prctl.2:92 build/C/man2/futex.2:227 build/C/man2/kexec_load.2:122 build/C/man2/lookup_dcookie.2:54 build/C/man2/modify_ldt.2:111 build/C/man2/pciconfig_read.2:75 build/C/man2/personality.2:63 build/C/man2/pivot_root.2:108 build/C/man2/ptrace.2:1595 build/C/man2/quotactl.2:432 build/C/man2/quotactl.2:499 build/C/man2/sendfile.2:124 build/C/man2/splice.2:147 build/C/man2/tee.2:101 build/C/man2/vmsplice.2:127
 #, no-wrap
 msgid "B<EINVAL>"
 msgstr ""
@@ -190,7 +190,7 @@ msgid "I<code> is not a valid subcommand."
 msgstr ""
 
 #. type: TP
-#: build/C/man2/arch_prctl.2:96 build/C/man2/kexec_load.2:129 build/C/man2/lookup_dcookie.2:65 build/C/man2/pciconfig_read.2:102 build/C/man2/pivot_root.2:114 build/C/man2/ptrace.2:437 build/C/man2/quotactl.2:454 build/C/man2/vm86.2:66
+#: build/C/man2/arch_prctl.2:96 build/C/man2/kexec_load.2:129 build/C/man2/lookup_dcookie.2:65 build/C/man2/pciconfig_read.2:102 build/C/man2/pivot_root.2:114 build/C/man2/ptrace.2:1605 build/C/man2/quotactl.2:454 build/C/man2/vm86.2:66
 #, no-wrap
 msgid "B<EPERM>"
 msgstr ""
@@ -203,7 +203,7 @@ msgid "I<addr> is outside the process address space."
 msgstr ""
 
 #. type: SH
-#: build/C/man2/arch_prctl.2:102 build/C/man2/futex.2:247 build/C/man2/kexec_load.2:138 build/C/man2/lookup_dcookie.2:78 build/C/man2/modify_ldt.2:128 build/C/man2/nfsservctl.2:53 build/C/man2/outb.2:58 build/C/man2/pciconfig_read.2:107 build/C/man2/personality.2:66 build/C/man2/pivot_root.2:122 build/C/man2/ptrace.2:453 build/C/man2/sendfile.2:144 build/C/man2/set_tid_address.2:89 build/C/man2/splice.2:169 build/C/man2/tee.2:118 build/C/man2/vm86.2:71 build/C/man2/vmsplice.2:142
+#: build/C/man2/arch_prctl.2:102 build/C/man2/futex.2:247 build/C/man2/kexec_load.2:138 build/C/man2/lookup_dcookie.2:78 build/C/man2/modify_ldt.2:128 build/C/man2/nfsservctl.2:56 build/C/man2/outb.2:58 build/C/man2/pciconfig_read.2:107 build/C/man2/personality.2:66 build/C/man2/pivot_root.2:122 build/C/man2/ptrace.2:1623 build/C/man2/sendfile.2:144 build/C/man2/set_tid_address.2:89 build/C/man2/splice.2:169 build/C/man2/tee.2:118 build/C/man2/vm86.2:71 build/C/man2/vmsplice.2:142
 #, no-wrap
 msgid "CONFORMING TO"
 msgstr ""
@@ -216,7 +216,7 @@ msgid ""
 msgstr ""
 
 #. type: SH
-#: build/C/man2/arch_prctl.2:106 build/C/man2/futex.2:249 build/C/man2/kexec_load.2:140 build/C/man2/lookup_dcookie.2:81 build/C/man2/modify_ldt.2:131 build/C/man2/pivot_root.2:125 build/C/man2/ptrace.2:455 build/C/man2/sendfile.2:151 build/C/man2/splice.2:171 build/C/man2/tee.2:120 build/C/man2/vmsplice.2:144
+#: build/C/man2/arch_prctl.2:106 build/C/man2/futex.2:249 build/C/man2/kexec_load.2:140 build/C/man2/lookup_dcookie.2:81 build/C/man2/modify_ldt.2:131 build/C/man2/pivot_root.2:125 build/C/man2/ptrace.2:1625 build/C/man2/sendfile.2:151 build/C/man2/splice.2:171 build/C/man2/tee.2:120 build/C/man2/vmsplice.2:144
 #, no-wrap
 msgid "NOTES"
 msgstr ""
@@ -263,7 +263,7 @@ msgid "I<FS> may be already used by the threading library."
 msgstr ""
 
 #. type: SH
-#: build/C/man2/arch_prctl.2:137 build/C/man2/futex.2:263 build/C/man2/kexec_load.2:155 build/C/man2/modify_ldt.2:134 build/C/man2/outb.2:67 build/C/man2/pciconfig_read.2:109 build/C/man2/pivot_root.2:137 build/C/man2/ptrace.2:530 build/C/man2/quotactl.2:505 build/C/man2/sendfile.2:193 build/C/man2/set_tid_address.2:91 build/C/man2/splice.2:225 build/C/man2/tee.2:196 build/C/man2/vmsplice.2:153
+#: build/C/man2/arch_prctl.2:137 build/C/man2/futex.2:263 build/C/man2/kexec_load.2:155 build/C/man2/modify_ldt.2:134 build/C/man2/outb.2:67 build/C/man2/pciconfig_read.2:109 build/C/man2/pivot_root.2:137 build/C/man2/ptrace.2:1716 build/C/man2/quotactl.2:505 build/C/man2/sendfile.2:193 build/C/man2/set_tid_address.2:91 build/C/man2/splice.2:225 build/C/man2/tee.2:196 build/C/man2/vmsplice.2:153
 #, no-wrap
 msgid "SEE ALSO"
 msgstr ""
@@ -279,17 +279,17 @@ msgid "AMD X86-64 Programmer's manual"
 msgstr ""
 
 #. type: SH
-#: build/C/man2/arch_prctl.2:144 build/C/man2/futex.2:274 build/C/man2/kexec_load.2:158 build/C/man2/lookup_dcookie.2:88 build/C/man2/modify_ldt.2:136 build/C/man2/nfsservctl.2:55 build/C/man2/outb.2:70 build/C/man2/pciconfig_read.2:111 build/C/man2/personality.2:70 build/C/man2/pivot_root.2:143 build/C/man2/ptrace.2:539 build/C/man2/quotactl.2:510 build/C/man2/sendfile.2:199 build/C/man2/set_tid_address.2:94 build/C/man2/splice.2:229 build/C/man2/tee.2:199 build/C/man2/vm86.2:74 build/C/man2/vmsplice.2:156
+#: build/C/man2/arch_prctl.2:144 build/C/man2/futex.2:274 build/C/man2/kexec_load.2:158 build/C/man2/lookup_dcookie.2:88 build/C/man2/modify_ldt.2:136 build/C/man2/nfsservctl.2:58 build/C/man2/outb.2:70 build/C/man2/pciconfig_read.2:111 build/C/man2/personality.2:70 build/C/man2/pivot_root.2:143 build/C/man2/ptrace.2:1730 build/C/man2/quotactl.2:510 build/C/man2/sendfile.2:199 build/C/man2/set_tid_address.2:94 build/C/man2/splice.2:229 build/C/man2/tee.2:199 build/C/man2/vm86.2:74 build/C/man2/vmsplice.2:156
 #, no-wrap
 msgid "COLOPHON"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/arch_prctl.2:151 build/C/man2/futex.2:281 build/C/man2/kexec_load.2:165 build/C/man2/lookup_dcookie.2:95 build/C/man2/modify_ldt.2:143 build/C/man2/nfsservctl.2:62 build/C/man2/outb.2:77 build/C/man2/pciconfig_read.2:118 build/C/man2/personality.2:77 build/C/man2/pivot_root.2:150 build/C/man2/ptrace.2:546 build/C/man2/quotactl.2:517 build/C/man2/sendfile.2:206 build/C/man2/set_tid_address.2:101 build/C/man2/splice.2:236 build/C/man2/tee.2:206 build/C/man2/vm86.2:81 build/C/man2/vmsplice.2:163
+#: build/C/man2/arch_prctl.2:151 build/C/man2/futex.2:281 build/C/man2/kexec_load.2:165 build/C/man2/lookup_dcookie.2:95 build/C/man2/modify_ldt.2:143 build/C/man2/nfsservctl.2:65 build/C/man2/outb.2:77 build/C/man2/pciconfig_read.2:118 build/C/man2/personality.2:77 build/C/man2/pivot_root.2:150 build/C/man2/ptrace.2:1737 build/C/man2/quotactl.2:517 build/C/man2/sendfile.2:206 build/C/man2/set_tid_address.2:101 build/C/man2/splice.2:236 build/C/man2/tee.2:206 build/C/man2/vm86.2:81 build/C/man2/vmsplice.2:163
 msgid ""
-"This page is part of release 3.35 of the Linux I<man-pages> project.  A "
+"This page is part of release 3.37 of the Linux I<man-pages> project.  A "
 "description of the project, and information about reporting bugs, can be "
-"found at http://man7.org/linux/man-pages/."
+"found at http://www.kernel.org/doc/man-pages/."
 msgstr ""
 
 #. type: TH
@@ -781,7 +781,7 @@ msgid ""
 msgstr ""
 
 #. type: TP
-#: build/C/man2/kexec_load.2:118 build/C/man2/pivot_root.2:104 build/C/man2/ptrace.2:413 build/C/man2/quotactl.2:493
+#: build/C/man2/kexec_load.2:118 build/C/man2/pivot_root.2:104 build/C/man2/ptrace.2:1581 build/C/man2/quotactl.2:493
 #, no-wrap
 msgid "B<EBUSY>"
 msgstr ""
@@ -1115,7 +1115,7 @@ msgstr ""
 #. type: TH
 #: build/C/man2/nfsservctl.2:8
 #, no-wrap
-msgid "1997-07-16"
+msgid "2012-03-05"
 msgstr ""
 
 #. type: Plain text
@@ -1138,7 +1138,12 @@ msgid ""
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/nfsservctl.2:30
+#: build/C/man2/nfsservctl.2:21
+msgid "I<Note>: Since Linux 3.1, this system call no longer exists."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/nfsservctl.2:33
 #, no-wrap
 msgid ""
 "/*\n"
@@ -1154,7 +1159,7 @@ msgid ""
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/nfsservctl.2:42
+#: build/C/man2/nfsservctl.2:45
 #, no-wrap
 msgid ""
 "struct nfsctl_arg {\n"
@@ -1171,7 +1176,7 @@ msgid ""
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/nfsservctl.2:47
+#: build/C/man2/nfsservctl.2:50
 #, no-wrap
 msgid ""
 "union nfsctl_res {\n"
@@ -1181,14 +1186,14 @@ msgid ""
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/nfsservctl.2:53 build/C/man2/pivot_root.2:99 build/C/man2/vm86.2:57
+#: build/C/man2/nfsservctl.2:56 build/C/man2/pivot_root.2:99 build/C/man2/vm86.2:57
 msgid ""
 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
 "appropriately."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/nfsservctl.2:55
+#: build/C/man2/nfsservctl.2:58
 msgid "This call is Linux-specific."
 msgstr ""
 
@@ -1365,7 +1370,7 @@ msgid "I<len> value is invalid.  This does not apply to B<pciconfig_iobase>()."
 msgstr ""
 
 #. type: TP
-#: build/C/man2/pciconfig_read.2:81 build/C/man2/ptrace.2:431 build/C/man2/sendfile.2:130
+#: build/C/man2/pciconfig_read.2:81 build/C/man2/ptrace.2:1598 build/C/man2/sendfile.2:130
 #, no-wrap
 msgid "B<EIO>"
 msgstr ""
@@ -1661,7 +1666,7 @@ msgid "B<pivot_root>()  is Linux-specific and hence is not portable."
 msgstr ""
 
 #. type: SH
-#: build/C/man2/pivot_root.2:128 build/C/man2/ptrace.2:518
+#: build/C/man2/pivot_root.2:128 build/C/man2/ptrace.2:1661
 #, no-wrap
 msgid "BUGS"
 msgstr ""
@@ -1686,30 +1691,30 @@ msgid "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
 msgstr ""
 
 #. type: TH
-#: build/C/man2/ptrace.2:45
+#: build/C/man2/ptrace.2:48
 #, no-wrap
 msgid "PTRACE"
 msgstr ""
 
 #. type: TH
-#: build/C/man2/ptrace.2:45
+#: build/C/man2/ptrace.2:48
 #, no-wrap
-msgid "2009-03-30"
+msgid "2012-03-06"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:48
+#: build/C/man2/ptrace.2:51
 msgid "ptrace - process trace"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:51
+#: build/C/man2/ptrace.2:54
 #, no-wrap
 msgid "B<#include E<lt>sys/ptrace.hE<gt>>\n"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:54
+#: build/C/man2/ptrace.2:57
 #, no-wrap
 msgid ""
 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
@@ -1717,91 +1722,122 @@ msgid ""
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:63
+#: build/C/man2/ptrace.2:66
+msgid ""
+"The B<ptrace>()  system call provides a means by which one process (the "
+"\"tracer\")  may observe and control the execution of another process (the "
+"\"tracee\"), and examine and change the tracee's memory and registers.  It "
+"is primarily used to implement breakpoint debugging and system call tracing."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:77
+msgid ""
+"A tracee first needs to be attached to the tracer.  Attachment and "
+"subsequent commands are per thread: in a multithreaded process, every thread "
+"can be individually attached to a (potentially different) tracer, or left "
+"not attached and thus not debugged.  Therefore, \"tracee\" always means "
+"\"(one) thread\", never \"a (possibly multithreaded) process\".  Ptrace "
+"commands are always sent to a specific tracee using a call of the form"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:79
+#, no-wrap
+msgid "    ptrace(PTRACE_foo, pid, ...)\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:83
+msgid "where I<pid> is the thread ID of the corresponding Linux thread."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:89
 msgid ""
-"The B<ptrace>()  system call provides a means by which a parent process may "
-"observe and control the execution of another process, and examine and change "
-"its core image and registers.  It is primarily used to implement breakpoint "
-"debugging and system call tracing."
+"(Note that in this page, a \"multithreaded process\" means a thread group "
+"consisting of threads created using the B<clone>(2)  B<CLONE_THREAD> flag.)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:72
+#: build/C/man2/ptrace.2:98
 msgid ""
-"The parent can initiate a trace by calling B<fork>(2)  and having the "
+"A process can initiate a trace by calling B<fork>(2)  and having the "
 "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an "
-"B<exec>(3).  Alternatively, the parent may commence trace of an existing "
+"B<execve>(2).  Alternatively, one process may commence tracing another "
 "process using B<PTRACE_ATTACH>."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:84
+#: build/C/man2/ptrace.2:115
 msgid ""
-"While being traced, the child will stop each time a signal is delivered, "
-"even if the signal is being ignored.  (The exception is B<SIGKILL>, which "
-"has its usual effect.)  The parent will be notified at its next B<wait>(2)  "
-"and may inspect and modify the child process while it is stopped.  The "
-"parent then causes the child to continue, optionally ignoring the delivered "
-"signal (or even delivering a different signal instead)."
+"While being traced, the tracee will stop each time a signal is delivered, "
+"even if the signal is being ignored.  (An exception is B<SIGKILL>, which has "
+"its usual effect.)  The tracer will be notified at its next call to "
+"B<waitpid>(2)  (or one of the related \"wait\" system calls); that call will "
+"return a I<status> value containing information that indicates the cause of "
+"the stop in the tracee.  While the tracee is stopped, the tracer can use "
+"various ptrace requests to inspect and modify the tracee.  The tracer then "
+"causes the tracee to continue, optionally ignoring the delivered signal (or "
+"even delivering a different signal instead)."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:90
+#: build/C/man2/ptrace.2:119
 msgid ""
-"When the parent is finished tracing, it can terminate the child with "
-"B<PTRACE_KILL> or cause it to continue executing in a normal, untraced mode "
-"via B<PTRACE_DETACH>."
+"When the tracer is finished tracing, it can cause the tracee to continue "
+"executing in a normal, untraced mode via B<PTRACE_DETACH>."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:92
+#: build/C/man2/ptrace.2:123
 msgid "The value of I<request> determines the action to be performed:"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:92
+#: build/C/man2/ptrace.2:123
 #, no-wrap
 msgid "B<PTRACE_TRACEME>"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:111
+#: build/C/man2/ptrace.2:145
 msgid ""
-"Indicates that this process is to be traced by its parent.  Any signal "
+"Indicate that this process is to be traced by its parent.  Any signal "
 "(except B<SIGKILL>)  delivered to this process will cause it to stop and its "
-"parent to be notified via B<wait>(2).  Also, all subsequent calls to "
-"B<execve>(2)  by this process will cause a B<SIGTRAP> to be sent to it, "
-"giving the parent a chance to gain control before the new program begins "
+"parent to be notified via B<waitpid>(2).  In addition, all subsequent calls "
+"to B<execve>(2)  by the traced process will cause a B<SIGTRAP> to be sent to "
+"it, giving the parent a chance to gain control before the new program begins "
 "execution.  A process probably shouldn't make this request if its parent "
 "isn't expecting to trace it.  (I<pid>, I<addr>, and I<data> are ignored.)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:120
+#: build/C/man2/ptrace.2:156
 msgid ""
-"The above request is used only by the child process; the rest are used only "
-"by the parent.  In the following requests, I<pid> specifies the child "
-"process to be acted on.  For requests other than B<PTRACE_KILL>, the child "
-"process must be stopped."
+"The B<PTRACE_TRACEME> request is used only by the tracee; the remaining "
+"requests are used only by the tracer.  In the following requests, I<pid> "
+"specifies the thread ID of the tracee to be acted on.  For requests other "
+"than B<PTRACE_KILL>, the tracee must be stopped."
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:120
+#: build/C/man2/ptrace.2:156
 #, no-wrap
 msgid "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:130
+#: build/C/man2/ptrace.2:167
 msgid ""
-"Reads a word at the location I<addr> in the child's memory, returning the "
+"Read a word at the address I<addr> in the tracee's memory, returning the "
 "word as the result of the B<ptrace>()  call.  Linux does not have separate "
-"text and data address spaces, so the two requests are currently equivalent.  "
-"(The argument I<data> is ignored.)"
+"text and data address spaces, so these two requests are currently "
+"equivalent.  (I<data> is ignored.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:130
+#: build/C/man2/ptrace.2:167
 #, no-wrap
 msgid "B<PTRACE_PEEKUSER>"
 msgstr ""
@@ -1809,221 +1845,286 @@ msgstr ""
 #.  PTRACE_PEEKUSR in kernel source, but glibc uses PTRACE_PEEKUSER,
 #.  and that is the name that seems common on other systems.
 #. type: Plain text
-#: build/C/man2/ptrace.2:146
+#: build/C/man2/ptrace.2:185
 msgid ""
-"Reads a word at offset I<addr> in the child's USER area, which holds the "
+"Read a word at offset I<addr> in the tracee's USER area, which holds the "
 "registers and other information about the process (see "
 "I<E<lt>sys/user.hE<gt>>).  The word is returned as the result of the "
-"B<ptrace>()  call.  Typically the offset must be word-aligned, though this "
+"B<ptrace>()  call.  Typically, the offset must be word-aligned, though this "
 "might vary by architecture.  See NOTES.  (I<data> is ignored.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:146
+#: build/C/man2/ptrace.2:185
 #, no-wrap
 msgid "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:154
+#: build/C/man2/ptrace.2:197
 msgid ""
-"Copies the word I<data> to location I<addr> in the child's memory.  As "
-"above, the two requests are currently equivalent."
+"Copy the word I<data> to the address I<addr> in the tracee's memory.  As for "
+"B<PTRACE_PEEKTEXT> and B<PTRACE_PEEKDATA>, these two requests are currently "
+"equivalent."
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:154
+#: build/C/man2/ptrace.2:197
 #, no-wrap
 msgid "B<PTRACE_POKEUSER>"
 msgstr ""
 
 #.  PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
 #.  and that is the name that seems common on other systems.
+#.  FIXME In the preceding sentence, which modifications are disallowed,
+#.  and when they are disallowed, how does userspace discover that fact?
 #. type: Plain text
-#: build/C/man2/ptrace.2:166
+#: build/C/man2/ptrace.2:213
 msgid ""
-"Copies the word I<data> to offset I<addr> in the child's USER area.  As "
-"above, the offset must typically be word-aligned.  In order to maintain the "
-"integrity of the kernel, some modifications to the USER area are disallowed."
+"Copy the word I<data> to offset I<addr> in the tracee's USER area.  As for "
+"B<PTRACE_PEEKUSER>, the offset must typically be word-aligned.  In order to "
+"maintain the integrity of the kernel, some modifications to the USER area "
+"are disallowed."
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:166
+#: build/C/man2/ptrace.2:213
 #, no-wrap
 msgid "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:173
+#: build/C/man2/ptrace.2:224
 msgid ""
-"Copies the child's general purpose or floating-point registers, "
-"respectively, to location I<data> in the parent.  See "
-"I<E<lt>sys/user.hE<gt>> for information on the format of this data.  "
-"(I<addr> is ignored.)"
+"Copy the tracee's general-purpose or floating-point registers, respectively, "
+"to the address I<data> in the tracer.  See I<E<lt>sys/user.hE<gt>> for "
+"information on the format of this data.  (I<addr> is ignored.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:173
+#: build/C/man2/ptrace.2:224
 #, no-wrap
 msgid "B<PTRACE_GETSIGINFO> (since Linux 2.3.99-pre6)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:180
+#: build/C/man2/ptrace.2:236
 msgid ""
-"Retrieve information about the signal that caused the stop.  Copies a "
-"I<siginfo_t> structure (see B<sigaction>(2))  from the child to location "
-"I<data> in the parent.  (I<addr> is ignored.)"
+"Retrieve information about the signal that caused the stop.  Copy a "
+"I<siginfo_t> structure (see B<sigaction>(2))  from the tracee to the address "
+"I<data> in the tracer.  (I<addr> is ignored.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:180
+#: build/C/man2/ptrace.2:236
 #, no-wrap
 msgid "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
 msgstr ""
 
+#.  FIXME In the preceding sentence, which modifications are disallowed,
+#.  and when they are disallowed, how does userspace discover that fact?
 #. type: Plain text
-#: build/C/man2/ptrace.2:189
+#: build/C/man2/ptrace.2:249
 msgid ""
-"Copies the child's general purpose or floating-point registers, "
-"respectively, from location I<data> in the parent.  As for "
-"B<PTRACE_POKEUSER>, some general purpose register modifications may be "
-"disallowed.  (I<addr> is ignored.)"
+"Copy the tracee's general-purpose or floating-point registers, respectively, "
+"from the address I<data> in the tracer.  As for B<PTRACE_POKEUSER>, some "
+"general-purpose register modifications may be disallowed.  (I<addr> is "
+"ignored.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:189
+#: build/C/man2/ptrace.2:249
 #, no-wrap
 msgid "B<PTRACE_SETSIGINFO> (since Linux 2.3.99-pre6)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:201
+#: build/C/man2/ptrace.2:265
 msgid ""
-"Set signal information.  Copies a I<siginfo_t> structure from location "
-"I<data> in the parent to the child.  This will only affect signals that "
-"would normally be delivered to the child and were caught by the tracer.  It "
+"Set signal information: copy a I<siginfo_t> structure from the address "
+"I<data> in the tracer to the tracee.  This will affect only signals that "
+"would normally be delivered to the tracee and were caught by the tracer.  It "
 "may be difficult to tell these normal signals from synthetic signals "
 "generated by B<ptrace>()  itself.  (I<addr> is ignored.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:201
+#: build/C/man2/ptrace.2:265
 #, no-wrap
 msgid "B<PTRACE_SETOPTIONS> (since Linux 2.4.6; see BUGS for caveats)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:207
+#: build/C/man2/ptrace.2:274
 msgid ""
-"Sets ptrace options from I<data> in the parent.  (I<addr> is ignored.)  "
-"I<data> is interpreted as a bit mask of options, which are specified by the "
-"following flags:"
+"Set ptrace options from I<data>.  (I<addr> is ignored.)  I<data> is "
+"interpreted as a bit mask of options, which are specified by the following "
+"flags:"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:208
+#: build/C/man2/ptrace.2:275
 #, no-wrap
 msgid "B<PTRACE_O_TRACESYSGOOD> (since Linux 2.4.6)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:216
+#: build/C/man2/ptrace.2:284
 msgid ""
-"When delivering syscall traps, set bit 7 in the signal number (i.e., deliver "
-"I<SIGTRAP | 0x80>).  This makes it easy for the tracer to tell the "
-"difference between normal traps and those caused by a syscall.  "
-"(B<PTRACE_O_TRACESYSGOOD> may not work on all architectures.)"
+"When delivering system call traps, set bit 7 in the signal number (i.e., "
+"deliver I<SIGTRAP|0x80>).  This makes it easy for the tracer to distinguish "
+"normal traps from those caused by a system call.  (B<PTRACE_O_TRACESYSGOOD> "
+"may not work on all architectures.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:216
+#: build/C/man2/ptrace.2:284
 #, no-wrap
 msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:226
+#: build/C/man2/ptrace.2:296
 msgid ""
-"Stop the child at the next B<fork>(2)  call with I<SIGTRAP | "
-"PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
-"newly forked process, which will start with a B<SIGSTOP>.  The PID for the "
-"new process can be retrieved with B<PTRACE_GETEVENTMSG>."
+"Stop the tracee at the next B<fork>(2)  and automatically start tracing the "
+"newly forked process, which will start with a B<SIGSTOP>.  A B<waitpid>(2)  "
+"by the tracer will return a I<status> value such that"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:299
+#, no-wrap
+msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:303 build/C/man2/ptrace.2:322 build/C/man2/ptrace.2:341
+msgid "The PID of the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:226
+#: build/C/man2/ptrace.2:303
 #, no-wrap
 msgid "B<PTRACE_O_TRACEVFORK> (since Linux 2.5.46)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:235
+#: build/C/man2/ptrace.2:315
 msgid ""
-"Stop the child at the next B<vfork>(2)  call with I<SIGTRAP | "
-"PTRACE_EVENT_VFORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
-"newly vforked process, which will start with a B<SIGSTOP>.  The PID for the "
-"new process can be retrieved with B<PTRACE_GETEVENTMSG>."
+"Stop the tracee at the next B<vfork>(2)  and automatically start tracing the "
+"newly vforked process, which will start with a B<SIGSTOP>.  A B<waitpid>(2)  "
+"by the tracer will return a I<status> value such that"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:318
+#, no-wrap
+msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:235
+#: build/C/man2/ptrace.2:322
 #, no-wrap
 msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:265
+#: build/C/man2/ptrace.2:334
+msgid ""
+"Stop the tracee at the next B<clone>(2)  and automatically start tracing the "
+"newly cloned process, which will start with a B<SIGSTOP>.  A B<waitpid>(2)  "
+"by the tracer will return a I<status> value such that"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:337
+#, no-wrap
+msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:362
 msgid ""
-"Stop the child at the next B<clone>(2)  call with I<SIGTRAP | "
-"PTRACE_EVENT_CLONE\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
-"newly cloned process, which will start with a B<SIGSTOP>.  The PID for the "
-"new process can be retrieved with B<PTRACE_GETEVENTMSG>.  This option may "
-"not catch B<clone>(2)  calls in all cases.  If the child calls B<clone>(2)  "
-"with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will be delivered "
-"instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the child calls "
-"B<clone>(2)  with the exit signal set to B<SIGCHLD>, B<PTRACE_EVENT_FORK> "
-"will be delivered if B<PTRACE_O_TRACEFORK> is set."
+"This option may not catch B<clone>(2)  calls in all cases.  If the tracee "
+"calls B<clone>(2)  with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will "
+"be delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
+"tracee calls B<clone>(2)  with the exit signal set to B<SIGCHLD>, "
+"B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:265
+#: build/C/man2/ptrace.2:362
 #, no-wrap
 msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:270
+#: build/C/man2/ptrace.2:371
 msgid ""
-"Stop the child at the next B<execve>(2)  call with I<SIGTRAP | "
-"PTRACE_EVENT_EXEC\\ E<lt>E<lt>\\ 8>."
+"Stop the tracee at the next B<execve>(2).  A B<waitpid>(2)  by the tracer "
+"will return a I<status> value such that"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:374
+#, no-wrap
+msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:270
+#: build/C/man2/ptrace.2:376
 #, no-wrap
 msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:275
+#: build/C/man2/ptrace.2:385
+msgid ""
+"Stop the tracee at the completion of the next B<vfork>(2).  A B<waitpid>(2)  "
+"by the tracer will return a I<status> value such that"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:388
+#, no-wrap
+msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONEE<lt>E<lt>8))\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:392
 msgid ""
-"Stop the child at the completion of the next B<vfork>(2)  call with "
-"I<SIGTRAP | PTRACE_EVENT_VFORK_DONE\\ E<lt>E<lt>\\ 8>."
+"The PID of the new process can (since Linux 2.6.18) be retrieved with "
+"B<PTRACE_GETEVENTMSG>."
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:275
+#: build/C/man2/ptrace.2:392
 #, no-wrap
 msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:286
+#: build/C/man2/ptrace.2:400
 msgid ""
-"Stop the child at exit with I<SIGTRAP | PTRACE_EVENT_EXIT\\ E<lt>E<lt>\\ "
-"8>.  The child's exit status can be retrieved with B<PTRACE_GETEVENTMSG>.  "
-"This stop will be done early during process exit when registers are still "
+"Stop the tracee at exit.  A B<waitpid>(2)  by the tracer will return a "
+"I<status> value such that"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:403
+#, no-wrap
+msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:407
+msgid "The tracee's exit status can be retrieved with B<PTRACE_GETEVENTMSG>."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:415
+msgid ""
+"The tracee is stopped early during process exit, when registers are still "
 "available, allowing the tracer to see where the exit occurred, whereas the "
 "normal exit notification is done after the process is finished exiting.  "
 "Even though context is available, the tracer cannot prevent the exit from "
@@ -2031,274 +2132,1426 @@ msgid ""
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:287
+#: build/C/man2/ptrace.2:416
 #, no-wrap
 msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:307
+#: build/C/man2/ptrace.2:436
 msgid ""
 "Retrieve a message (as an I<unsigned long>)  about the ptrace event that "
-"just happened, placing it in the location I<data> in the parent.  For "
-"B<PTRACE_EVENT_EXIT> this is the child's exit status.  For "
-"B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK> and B<PTRACE_EVENT_CLONE> this "
-"is the PID of the new process.  Since Linux 2.6.18, the PID of the new "
-"process is also available for B<PTRACE_EVENT_VFORK_DONE>.  (I<addr> is "
+"just happened, placing it at the address I<data> in the tracer.  For "
+"B<PTRACE_EVENT_EXIT>, this is the tracee's exit status.  For "
+"B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_VFORK_DONE>, and "
+"B<PTRACE_EVENT_CLONE>, this is the PID of the new process.  (I<addr> is "
 "ignored.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:307
+#: build/C/man2/ptrace.2:436
 #, no-wrap
 msgid "B<PTRACE_CONT>"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:317
+#: build/C/man2/ptrace.2:448
 msgid ""
-"Restarts the stopped child process.  If I<data> is nonzero and not "
-"B<SIGSTOP>, it is interpreted as a signal to be delivered to the child; "
-"otherwise, no signal is delivered.  Thus, for example, the parent can "
-"control whether a signal sent to the child is delivered or not.  (I<addr> is "
-"ignored.)"
+"Restart the stopped tracee process.  If I<data> is nonzero, it is "
+"interpreted as the number of a signal to be delivered to the tracee; "
+"otherwise, no signal is delivered.  Thus, for example, the tracer can "
+"control whether a signal sent to the tracee is delivered or not.  (I<addr> "
+"is ignored.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:317
+#: build/C/man2/ptrace.2:448
 #, no-wrap
 msgid "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:341
+#: build/C/man2/ptrace.2:472
 msgid ""
-"Restarts the stopped child as for B<PTRACE_CONT>, but arranges for the child "
+"Restart the stopped tracee as for B<PTRACE_CONT>, but arrange for the tracee "
 "to be stopped at the next entry to or exit from a system call, or after "
-"execution of a single instruction, respectively.  (The child will also, as "
-"usual, be stopped upon receipt of a signal.)  From the parent's perspective, "
-"the child will appear to have been stopped by receipt of a B<SIGTRAP>.  So, "
+"execution of a single instruction, respectively.  (The tracee will also, as "
+"usual, be stopped upon receipt of a signal.)  From the tracer's perspective, "
+"the tracee will appear to have been stopped by receipt of a B<SIGTRAP>.  So, "
 "for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to "
 "the system call at the first stop, then do another B<PTRACE_SYSCALL> and "
 "inspect the return value of the system call at the second stop.  The I<data> "
-"argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored.)"
+"argument is treated as for B<PTRACE_CONT>.  (addr is ignored.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:341
+#: build/C/man2/ptrace.2:472
 #, no-wrap
 msgid "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (since Linux 2.6.14)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:359
+#: build/C/man2/ptrace.2:490
 msgid ""
-"For B<PTRACE_SYSEMU>, continue and stop on entry to the next syscall, which "
-"will not be executed.  For B<PTRACE_SYSEMU_SINGLESTEP>, do the same but also "
-"singlestep if not a syscall.  This call is used by programs like User Mode "
-"Linux that want to emulate all the child's system calls.  The I<data> "
-"argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored; not "
-"supported on all architectures.)"
+"For B<PTRACE_SYSEMU>, continue and stop on entry to the next system call, "
+"which will not be executed.  For B<PTRACE_SYSEMU_SINGLESTEP>, do the same "
+"but also singlestep if not a system call.  This call is used by programs "
+"like User Mode Linux that want to emulate all the tracee's system calls.  "
+"The I<data> argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored; "
+"not supported on all architectures.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:359
+#: build/C/man2/ptrace.2:490
 #, no-wrap
 msgid "B<PTRACE_KILL>"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:365
+#: build/C/man2/ptrace.2:499
 msgid ""
-"Sends the child a B<SIGKILL> to terminate it.  (I<addr> and I<data> are "
+"Send the tracee a B<SIGKILL> to terminate it.  (I<addr> and I<data> are "
 "ignored.)"
 msgstr ""
 
+#.  [Note from Denys Vlasenko:
+#.      deprecation suggested by Oleg Nesterov. He prefers to deprecate it
+#.      instead of describing (and needing to support) PTRACE_KILL's quirks.]
+#. type: Plain text
+#: build/C/man2/ptrace.2:518
+msgid ""
+"I<This operation is deprecated; do not use it!> Instead, send a B<SIGKILL> "
+"directly using B<kill>(2)  or B<tgkill>(2).  The problem with B<PTRACE_KILL> "
+"is that it requires the tracee to be in signal-delivery-stop, otherwise it "
+"may not work (i.e., may complete successfully but won't kill the tracee).  "
+"By contrast, sending a B<SIGKILL> directly has no such limitation."
+msgstr ""
+
 #. type: TP
-#: build/C/man2/ptrace.2:365
+#: build/C/man2/ptrace.2:518
 #, no-wrap
 msgid "B<PTRACE_ATTACH>"
 msgstr ""
 
+#.  No longer true (removed by Denys Vlasenko, 2011, who remarks:
+#.         "I think it isn't true in non-ancient 2.4 and in 2.6/3.x.
+#.          Basically, it's not true for any Linux in practical use.
+#.  ; the behavior of the tracee is as if it had done a
+#.  .BR PTRACE_TRACEME .
+#.  The calling process actually becomes the parent of the tracee
+#.  process for most purposes (e.g., it will receive
+#.  notification of tracee events and appears in
+#.  .BR ps (1)
+#.  output as the tracee's parent), but a
+#.  .BR getppid (2)
+#.  by the tracee will still return the PID of the original parent.
 #. type: Plain text
-#: build/C/man2/ptrace.2:386
+#: build/C/man2/ptrace.2:546
 msgid ""
-"Attaches to the process specified in I<pid>, making it a traced \"child\" of "
-"the calling process; the behavior of the child is as if it had done a "
-"B<PTRACE_TRACEME>.  The calling process actually becomes the parent of the "
-"child process for most purposes (e.g., it will receive notification of child "
-"events and appears in B<ps>(1)  output as the child's parent), but a "
-"B<getppid>(2)  by the child will still return the PID of the original "
-"parent.  The child is sent a B<SIGSTOP>, but will not necessarily have "
-"stopped by the completion of this call; use B<wait>(2)  to wait for the "
-"child to stop.  (I<addr> and I<data> are ignored.)"
+"Attach to the process specified in I<pid>, making it a tracee of the calling "
+"process.  The tracee is sent a B<SIGSTOP>, but will not necessarily have "
+"stopped by the completion of this call; use B<waitpid>(2)  to wait for the "
+"tracee to stop.  See the \"Attaching and detaching\" subsection for "
+"additional information.  (I<addr> and I<data> are ignored.)"
 msgstr ""
 
 #. type: TP
-#: build/C/man2/ptrace.2:386
+#: build/C/man2/ptrace.2:546
 #, no-wrap
 msgid "B<PTRACE_DETACH>"
 msgstr ""
 
+#
+#.  In the text below, we decided to avoid prettifying the text with markup:
+#.  it would make the source nearly impossible to edit, and we _do_ intend
+#.  to edit it often, in order to keep it updated:
+#.  ptrace API is full of quirks, no need to compound this situation by
+#.  making it excruciatingly painful to document them!
 #. type: Plain text
-#: build/C/man2/ptrace.2:399
+#: build/C/man2/ptrace.2:562
 msgid ""
-"Restarts the stopped child as for B<PTRACE_CONT>, but first detaches from "
-"the process, undoing the reparenting effect of B<PTRACE_ATTACH>, and the "
-"effects of B<PTRACE_TRACEME>.  Although perhaps not intended, under Linux a "
-"traced child can be detached in this way regardless of which method was used "
-"to initiate tracing.  (I<addr> is ignored.)"
+"Restart the stopped tracee as for B<PTRACE_CONT>, but first detach from it.  "
+"Under Linux, a tracee can be detached in this way regardless of which method "
+"was used to initiate tracing.  (I<addr> is ignored.)"
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:562
+#, no-wrap
+msgid "Death under ptrace"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:412
+#: build/C/man2/ptrace.2:571
 msgid ""
-"On success, B<PTRACE_PEEK*> requests return the requested data, while other "
-"requests return zero.  On error, all requests return -1, and I<errno> is set "
-"appropriately.  Since the value returned by a successful B<PTRACE_PEEK*> "
-"request may be -1, the caller must check I<errno> after such requests to "
-"determine whether or not an error occurred."
+"When a (possibly multithreaded) process receives a killing signal (one whose "
+"disposition is set to B<SIG_DFL> and whose default action is to kill the "
+"process), all threads exit.  Tracees report their death to their tracer(s).  "
+"Notification of this event is delivered via B<waitpid>(2)."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:417
-msgid "(i386 only) There was an error with allocating or freeing a debug register."
+#: build/C/man2/ptrace.2:580
+msgid ""
+"Note that the killing signal will first cause signal-delivery-stop (on one "
+"tracee only), and only after it is injected by the tracer (or after it was "
+"dispatched to a thread which isn't traced), will death from the signal "
+"happen on I<all> tracees within a multithreaded process.  (The term "
+"\"signal-delivery-stop\" is explained below.)"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:428
+#: build/C/man2/ptrace.2:594
 msgid ""
-"There was an attempt to read from or write to an invalid area in the "
-"parent's or child's memory, probably because the area wasn't mapped or "
-"accessible.  Unfortunately, under Linux, different variations of this fault "
-"will return B<EIO> or B<EFAULT> more or less arbitrarily."
+"B<SIGKILL> operates similarly, with exceptions.  No signal-delivery-stop is "
+"generated for B<SIGKILL> and therefore the tracer can't suppress it.  "
+"B<SIGKILL> kills even within system calls (syscall-exit-stop is not "
+"generated prior to death by B<SIGKILL>).  The net effect is that B<SIGKILL> "
+"always kills the process (all its threads), even if some threads of the "
+"process are ptraced."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:431
-msgid "An attempt was made to set an invalid option."
+#: build/C/man2/ptrace.2:599
+msgid ""
+"When the tracee calls B<_exit>(2), it reports its death to its tracer.  "
+"Other threads are not affected."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:437
+#: build/C/man2/ptrace.2:603
 msgid ""
-"I<request> is invalid, or an attempt was made to read from or write to an "
-"invalid area in the parent's or child's memory, or there was a "
-"word-alignment violation, or an invalid signal was specified during a "
-"restart request."
+"When any thread executes B<exit_group>(2), every tracee in its thread group "
+"reports its death to its tracer."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:449
+#: build/C/man2/ptrace.2:617
 msgid ""
-"The specified process cannot be traced.  This could be because the parent "
-"has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); "
-"unprivileged processes cannot trace processes that they cannot send signals "
-"to or those running set-user-ID/set-group-ID programs, for obvious reasons.  "
-"Alternatively, the process may already be being traced, or be B<init>(8)  "
-"(PID 1)."
+"If the B<PTRACE_O_TRACEEXIT> option is on, B<PTRACE_EVENT_EXIT> will happen "
+"before actual death.  This applies to exits via B<exit>(2), "
+"B<exit_group>(2), and signal deaths (except B<SIGKILL>), and when threads "
+"are torn down on B<execve>(2)  in a multithreaded process."
 msgstr ""
 
-#. type: TP
-#: build/C/man2/ptrace.2:449 build/C/man2/quotactl.2:459 build/C/man2/quotactl.2:502
+#. type: Plain text
+#: build/C/man2/ptrace.2:642
+msgid ""
+"The tracer cannot assume that the ptrace-stopped tracee exists.  There are "
+"many scenarios when the tracee may die while stopped (such as B<SIGKILL>).  "
+"Therefore, the tracer must be prepared to handle an B<ESRCH> error on any "
+"ptrace operation.  Unfortunately, the same error is returned if the tracee "
+"exists but is not ptrace-stopped (for commands which require a stopped "
+"tracee), or if it is not traced by the process which issued the ptrace "
+"call.  The tracer needs to keep track of the stopped/running state of the "
+"tracee, and interpret B<ESRCH> as \"tracee died unexpectedly\" only if it "
+"knows that the tracee has been observed to enter ptrace-stop.  Note that "
+"there is no guarantee that I<waitpid(WNOHANG)> will reliably report the "
+"tracee's death status if a ptrace operation returned B<ESRCH>.  "
+"I<waitpid(WNOHANG)> may return 0 instead.  In other words, the tracee may be "
+"\"not yet fully dead\", but already refusing ptrace requests."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:656
+msgid ""
+"The tracer can't assume that the tracee I<always> ends its life by reporting "
+"I<WIFEXITED(status)> or I<WIFSIGNALED(status)>; there are cases where this "
+"does not occur.  For example, if a thread other than thread group leader "
+"does an B<execve>(2), it disappears; its PID will never be seen again, and "
+"any subsequent ptrace stops will be reported under the thread group leader's "
+"PID."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:656
 #, no-wrap
-msgid "B<ESRCH>"
+msgid "Stopped states"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:658
+msgid "A tracee can be in two states: running or stopped."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:453
+#: build/C/man2/ptrace.2:662
 msgid ""
-"The specified process does not exist, or is not currently being traced by "
-"the caller, or is not stopped (for requests that require that)."
+"There are many kinds of states when the tracee is stopped, and in ptrace "
+"discussions they are often conflated.  Therefore, it is important to use "
+"precise terms."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:455
-msgid "SVr4, 4.3BSD."
+#: build/C/man2/ptrace.2:673
+msgid ""
+"In this manual page, any stopped state in which the tracee is ready to "
+"accept ptrace commands from the tracer is called I<ptrace-stop>.  "
+"Ptrace-stops can be further subdivided into I<signal-delivery-stop>, "
+"I<group-stop>, I<syscall-stop>, and so on.  These stopped states are "
+"described in detail below."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:466
+#: build/C/man2/ptrace.2:678
 msgid ""
-"Although arguments to B<ptrace>()  are interpreted according to the "
-"prototype given, glibc currently declares B<ptrace>()  as a variadic "
-"function with only the I<request> argument fixed.  This means that unneeded "
-"trailing arguments may be omitted, though doing so makes use of undocumented "
-"B<gcc>(1)  behavior."
+"When the running tracee enters ptrace-stop, it notifies its tracer using "
+"B<waitpid>(2)  (or one of the other \"wait\" system calls).  Most of this "
+"manual page assumes that the tracer waits with:"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:469
-msgid "B<init>(8), the process with PID 1, may not be traced."
+#: build/C/man2/ptrace.2:680
+#, no-wrap
+msgid "    pid = waitpid(pid_or_minus_1, &status, __WALL);\n"
+msgstr ""
+
+#.  Denys Vlasenko:
+#.      Do we require __WALL usage, or will just using 0 be ok? (With 0,
+#.      I am not 100% sure there aren't ugly corner cases.) Are the
+#.      rules different if user wants to use waitid? Will waitid require
+#.      WEXITED?
+#. type: Plain text
+#: build/C/man2/ptrace.2:692
+msgid ""
+"Ptrace-stopped tracees are reported as returns with I<pid> greater than 0 "
+"and I<WIFSTOPPED(status)> true."
 msgstr ""
 
-#.  See http://lkml.org/lkml/2008/5/8/375
 #. type: Plain text
-#: build/C/man2/ptrace.2:476
+#: build/C/man2/ptrace.2:700
 msgid ""
-"The layout of the contents of memory and the USER area are quite OS- and "
-"architecture-specific.  The offset supplied, and the data returned, might "
-"not entirely match with the definition of I<struct user>."
+"The B<__WALL> flag does not include the B<WSTOPPED> and B<WEXITED> flags, "
+"but implies their functionality."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:479
+#: build/C/man2/ptrace.2:707
 msgid ""
-"The size of a \"word\" is determined by the OS variant (e.g., for 32-bit "
-"Linux it is 32 bits, etc.)."
+"Setting the B<WCONTINUED> flag when calling B<waitpid>(2)  is not "
+"recommended: the \"continued\" state is per-process and consuming it can "
+"confuse the real parent of the tracee."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:488
+#: build/C/man2/ptrace.2:715
 msgid ""
-"Tracing causes a few subtle differences in the semantics of traced "
-"processes.  For example, if a process is attached to with B<PTRACE_ATTACH>, "
-"its original parent can no longer receive notification via B<wait>(2)  when "
-"it stops, and there is no way for the new parent to effectively simulate "
-"this notification."
+"Use of the B<WNOHANG> flag may cause B<waitpid>(2)  to return 0 (\"no wait "
+"results available yet\")  even if the tracer knows there should be a "
+"notification.  Example:"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:502
+#: build/C/man2/ptrace.2:719
+#, no-wrap
 msgid ""
-"When the parent receives an event with B<PTRACE_EVENT_*> set, the child is "
-"not in the normal signal delivery path.  This means the parent cannot do "
-"B<ptrace>(PTRACE_CONT)  with a signal or B<ptrace>(PTRACE_KILL).  B<kill>(2)  "
-"with a B<SIGKILL> signal can be used instead to kill the child process after "
-"receiving one of these messages."
+"    kill(tracee, SIGKILL);\n"
+"    waitpid(tracee, &status, __WALL | WNOHANG);\n"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:510
+#: build/C/man2/ptrace.2:744
 msgid ""
-"This page documents the way the B<ptrace>()  call works currently in Linux.  "
-"Its behavior differs noticeably on other flavors of UNIX.  In any case, use "
-"of B<ptrace>()  is highly OS- and architecture-specific."
+"The following kinds of ptrace-stops exist: signal-delivery-stops, "
+"group-stop, PTRACE_EVENT stops, syscall-stops B<PTRACE_SINGLESTEP>, "
+"B<PTRACE_SYSEMU>, and B<PTRACE_SYSEMU_SINGLESTEP>.  They all are reported by "
+"B<waitpid>(2)  with I<WIFSTOPPED(status)> true.  They may be differentiated "
+"by examining the value I<statusE<gt>E<gt>8>, and if there is ambiguity in "
+"that value, by querying B<PTRACE_GETSIGINFO>.  (Note: the "
+"I<WSTOPSIG(status)> macro can't be used to perform this examination, because "
+"it returns the value (I<status\\E<gt>E<gt>8)\\ >B<&\\ 0xff>B<.)>"
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:744
+#, no-wrap
+msgid "Signal-delivery-stop"
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:518
+#: build/C/man2/ptrace.2:764
 msgid ""
-"The SunOS man page describes B<ptrace>()  as \"unique and arcane\", which it "
-"is.  The proc-based debugging interface present in Solaris 2 implements a "
-"superset of B<ptrace>()  functionality in a more powerful and uniform way."
+"When a (possibly multithreaded) process receives any signal except "
+"B<SIGKILL>, the kernel selects an arbitrary thread which handles the "
+"signal.  (If the signal is generated with B<tgkill>(2), the target thread "
+"can be explicitly selected by the caller.)  If the selected thread is "
+"traced, it enters signal-delivery-stop.  At this point, the signal is not "
+"yet delivered to the process, and can be suppressed by the tracer.  If the "
+"tracer doesn't suppress the signal, it passes the signal to the tracee in "
+"the next ptrace restart request.  This second step of signal delivery is "
+"called I<signal injection> in this manual page.  Note that if the signal is "
+"blocked, signal-delivery-stop doesn't happen until the signal is unblocked, "
+"with the usual exception that B<SIGSTOP> can't be blocked."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:530
+#: build/C/man2/ptrace.2:778
 msgid ""
-"On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
-"different value than the one for 2.4.  This leads to applications compiled "
-"with such headers failing when run on 2.4 kernels.  This can be worked "
-"around by redefining B<PTRACE_SETOPTIONS> to B<PTRACE_OLDSETOPTIONS>, if "
-"that is defined."
+"Signal-delivery-stop is observed by the tracer as B<waitpid>(2)  returning "
+"with I<WIFSTOPPED(status)> true, with the stopping signal returned by "
+"I<WSTOPSIG(status)>.  If the stopping signal is B<SIGTRAP>, this may be a "
+"different kind of ptrace-stop; see the \"Syscall-stops\" and \"execve\" "
+"sections below for details.  If I<WSTOPSIG(status)> returns a stopping "
+"signal, this may be a group-stop; see below."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:778
+#, no-wrap
+msgid "Signal injection and suppression"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:781
+msgid ""
+"After signal-delivery-stop is observed by the tracer, the tracer should "
+"restart the tracee with the call"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:783
+#, no-wrap
+msgid "    ptrace(PTRACE_restart, pid, 0, sig)\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:796
+msgid ""
+"where B<PTRACE_restart> is one of the restarting ptrace requests.  If I<sig> "
+"is 0, then a signal is not delivered.  Otherwise, the signal I<sig> is "
+"delivered.  This operation is called I<signal injection> in this manual "
+"page, to distinguish it from signal-delivery-stop."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:802
+msgid ""
+"The I<sig> value may be different from the I<WSTOPSIG(status)> value: the "
+"tracer can cause a different signal to be injected."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:813
+msgid ""
+"Note that a suppressed signal still causes system calls to return "
+"prematurely.  Restartable system calls will be restarted (the tracer will "
+"observe the tracee to execute B<restart_syscall(2)> if the tracer uses "
+"B<PTRACE_SYSCALL>); non-restartable system calls may fail with B<EINTR> even "
+"though no observable signal is injected to the tracee."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:824
+msgid ""
+"Restarting ptrace commands issued in ptrace-stops other than "
+"signal-delivery-stop are not guaranteed to inject a signal, even if I<sig> "
+"is nonzero.  No error is reported; a nonzero I<sig> may simply be ignored.  "
+"Ptrace users should not try to \"create a new signal\" this way: use "
+"B<tgkill>(2)  instead."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:831
+msgid ""
+"The fact that signal injection requests may be ignored when restarting the "
+"tracee after ptrace stops that are not signal-delivery-stops is a cause of "
+"confusion among ptrace users.  One typical scenario is that the tracer "
+"observes group-stop, mistakes it for signal-delivery-stop, restarts the "
+"tracee with"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:833
+#, no-wrap
+msgid "    ptrace(PTRACE_rest, pid, 0, stopsig)\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:839
+msgid ""
+"with the intention of injecting I<stopsig>, but I<stopsig> gets ignored and "
+"the tracee continues to run."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:859
+msgid ""
+"The B<SIGCONT> signal has a side effect of waking up (all threads of)  a "
+"group-stopped process.  This side effect happens before "
+"signal-delivery-stop.  The tracer can't suppress this side-effect (it can "
+"only suppress signal injection, which only causes the B<SIGCONT> handler to "
+"not be executed in the tracee, if such a handler is installed).  In fact, "
+"waking up from group-stop may be followed by signal-delivery-stop for "
+"signal(s)  I<other than> B<SIGCONT>, if they were pending when B<SIGCONT> "
+"was delivered.  In other words, B<SIGCONT> may be not the first signal "
+"observed by the tracee after it was sent."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:863
+msgid ""
+"Stopping signals cause (all threads of) a process to enter group-stop.  This "
+"side effect happens after signal injection, and therefore can be suppressed "
+"by the tracer."
+msgstr ""
+
+#.  In the Linux 2.4 sources, in arch/i386/kernel/signal.c::do_signal(),
+#.  there is:
+#
+#.              /* The debugger continued.  Ignore SIGSTOP.  */
+#.              if (signr == SIGSTOP)
+#.                      continue;
+#. type: Plain text
+#: build/C/man2/ptrace.2:873
+msgid "In Linux 2.4 and earlier, the B<SIGSTOP> signal can't be injected."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:890
+msgid ""
+"B<PTRACE_GETSIGINFO> can be used to retrieve a I<siginfo_t> structure which "
+"corresponds to the delivered signal.  B<PTRACE_SETSIGINFO> may be used to "
+"modify it.  If B<PTRACE_SETSIGINFO> has been used to alter I<siginfo_t>, the "
+"I<si_signo> field and the I<sig> parameter in the restarting command must "
+"match, otherwise the result is undefined."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:890
+#, no-wrap
+msgid "Group-stop"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:902
+msgid ""
+"When a (possibly multithreaded) process receives a stopping signal, all "
+"threads stop.  If some threads are traced, they enter a group-stop.  Note "
+"that the stopping signal will first cause signal-delivery-stop (on one "
+"tracee only), and only after it is injected by the tracer (or after it was "
+"dispatched to a thread which isn't traced), will group-stop be initiated on "
+"I<all> tracees within the multithreaded process.  As usual, every tracee "
+"reports its group-stop separately to the corresponding tracer."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:911
+msgid ""
+"Group-stop is observed by the tracer as B<waitpid>(2)  returning with "
+"I<WIFSTOPPED(status)> true, with the stopping signal available via "
+"I<WSTOPSIG(status)>.  The same result is returned by some other classes of "
+"ptrace-stops, therefore the recommended practice is to perform the call"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:913
+#, no-wrap
+msgid "    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:934
+msgid ""
+"The call can be avoided if the signal is not B<SIGSTOP>, B<SIGTSTP>, "
+"B<SIGTTIN>, or B<SIGTTOU>; only these four signals are stopping signals.  If "
+"the tracer sees something else, it can't be a group-stop.  Otherwise, the "
+"tracer needs to call B<PTRACE_GETSIGINFO>.  If B<PTRACE_GETSIGINFO> fails "
+"with B<EINVAL>, then it is definitely a group-stop.  (Other failure codes "
+"are possible, such as B<ESRCH> (\"no such process\") if a B<SIGKILL> killed "
+"the tracee.)"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:943
+msgid ""
+"As of kernel 2.6.38, after the tracer sees the tracee ptrace-stop and until "
+"it restarts or kills it, the tracee will not run, and will not send "
+"notifications (except B<SIGKILL> death) to the tracer, even if the tracer "
+"enters into another B<waitpid>(2)  call."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:957
+msgid ""
+"The kernel behavior described in the previous paragraph causes a problem "
+"with transparent handling of stopping signals.  If the tracer restarts the "
+"tracee after group-stop, the stopping signal is effectively ignored\\(emthe "
+"tracee doesn't remain stopped, it runs.  If the tracer doesn't restart the "
+"tracee before entering into the next B<waitpid>(2), future B<SIGCONT> "
+"signals will not be reported to the tracer; this would cause the B<SIGCONT> "
+"signals to have no effect on the tracee."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:957
+#, no-wrap
+msgid "PTRACE_EVENT stops"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:963
+msgid ""
+"If the tracer sets B<PTRACE_O_TRACE_*> options, the tracee will enter "
+"ptrace-stops called B<PTRACE_EVENT> stops."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:977
+msgid ""
+"B<PTRACE_EVENT> stops are observed by the tracer as B<waitpid>(2)  returning "
+"with I<WIFSTOPPED(status)>, and I<WSTOPSIG(status)> returns B<SIGTRAP>.  An "
+"additional bit is set in the higher byte of the status word: the value "
+"I<statusE<gt>E<gt>8> will be"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:979
+#, no-wrap
+msgid "    (SIGTRAP | PTRACE_EVENT_foo E<lt>E<lt> 8).\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:981
+msgid "The following events exist:"
+msgstr ""
+
+#. type: TP
+#: build/C/man2/ptrace.2:981
+#, no-wrap
+msgid "B<PTRACE_EVENT_VFORK>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:994
+msgid ""
+"Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> "
+"flag.  When the tracee is continued after this stop, it will wait for child "
+"to exit/exec before continuing its execution (in other words, the usual "
+"behavior on B<vfork>(2))."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/ptrace.2:994
+#, no-wrap
+msgid "B<PTRACE_EVENT_FORK>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1002
+msgid ""
+"Stop before return from B<fork>(2)  or B<clone>(2)  with the exit signal set "
+"to B<SIGCHLD>."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/ptrace.2:1002
+#, no-wrap
+msgid "B<PTRACE_EVENT_CLONE>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1006
+msgid "Stop before return from B<clone>(2)"
+msgstr ""
+
+#. type: TP
+#: build/C/man2/ptrace.2:1006
+#, no-wrap
+msgid "B<PTRACE_EVENT_VFORK_DONE>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1016
+msgid ""
+"Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> "
+"flag, but after the child unblocked this tracee by exiting or execing."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1022
+msgid ""
+"For all four stops described above, the stop occurs in the parent (i.e., the "
+"tracee), not in the newly created thread.  B<PTRACE_GETEVENTMSG> can be used "
+"to retrieve the new thread's ID."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/ptrace.2:1022
+#, no-wrap
+msgid "B<PTRACE_EVENT_EXEC>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1026
+msgid "Stop before return from B<execve>(2)."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/ptrace.2:1026
+#, no-wrap
+msgid "B<PTRACE_EVENT_EXIT>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1042
+msgid ""
+"Stop before exit (including death from B<exit_group>(2)), signal death, or "
+"exit caused by B<execve>(2)  in a multithreaded process.  "
+"B<PTRACE_GETEVENTMSG> returns the exit status.  Registers can be examined "
+"(unlike when \"real\" exit happens).  The tracee is still alive; it needs to "
+"be B<PTRACE_CONT>ed or B<PTRACE_DETACH>ed to finish exiting."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1053
+msgid ""
+"B<PTRACE_GETSIGINFO> on B<PTRACE_EVENT> stops returns B<SIGTRAP in> "
+"I<si_signo>, with I<si_code> set to I<(eventE<lt>E<lt>8)\\ |\\ SIGTRAP>."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:1053
+#, no-wrap
+msgid "Syscall-stops"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1066
+msgid ""
+"If the tracee was restarted by B<PTRACE_SYSCALL>, the tracee enters "
+"syscall-enter-stop just prior to entering any system call.  If the tracer "
+"restarts the tracee with B<PTRACE_SYSCALL>, the tracee enters "
+"syscall-exit-stop when the system call is finished, or if it is interrupted "
+"by a signal.  (That is, signal-delivery-stop never happens between "
+"syscall-enter-stop and syscall-exit-stop; it happens I<after> "
+"syscall-exit-stop.)"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1080
+msgid ""
+"Other possibilities are that the tracee may stop in a B<PTRACE_EVENT> stop, "
+"exit (if it entered B<_exit>(2)  or B<exit_group>(2)), be killed by "
+"B<SIGKILL>, or die silently (if it is a thread group leader, the "
+"B<execve>(2)  happened in another thread, and that thread is not traced by "
+"the same tracer; this situation is discussed later)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1095
+msgid ""
+"Syscall-enter-stop and syscall-exit-stop are observed by the tracer as "
+"B<waitpid>(2)  returning with I<WIFSTOPPED(status)> true, and "
+"I<WSTOPSIG(status)> giving B<SIGTRAP>.  If the B<PTRACE_O_TRACESYSGOOD> "
+"option was set by the tracer, then I<WSTOPSIG(status)> will give the value "
+"I<(SIGTRAP\\ |\\ 0x80)>."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1101
+msgid ""
+"Syscall-stops can be distinguished from signal-delivery-stop with B<SIGTRAP> "
+"by querying B<PTRACE_GETSIGINFO> for the following cases:"
+msgstr ""
+
+#. type: TP
+#: build/C/man2/ptrace.2:1101
+#, no-wrap
+msgid "I<si_code> E<lt>= 0"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1113
+msgid ""
+"B<SIGTRAP> was delivered as a result of a userspace action, for example, a "
+"system call (B<tgkill>(2), B<kill>(2), B<sigqueue>(3), etc.), expiration of "
+"a POSIX timer, change of state on a POSIX message queue, or completion of an "
+"asynchronous I/O request."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/ptrace.2:1113
+#, no-wrap
+msgid "I<si_code> == SI_KERNEL (0x80)"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1117
+msgid "B<SIGTRAP> was sent by the kernel."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/ptrace.2:1117
+#, no-wrap
+msgid "I<si_code> == SIGTRAP or I<si_code> == (SIGTRAP|0x80)"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1120
+msgid "This is a syscall-stop."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1125
+msgid ""
+"However, syscall-stops happen very often (twice per system call), and "
+"performing B<PTRACE_GETSIGINFO> for every syscall-stop may be somewhat "
+"expensive."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1148
+msgid ""
+"Some architectures allow the cases to be distinguished by examining "
+"registers.  For example, on x86, I<rax> == -B<ENOSYS> in "
+"syscall-enter-stop.  Since B<SIGTRAP> (like any other signal) always happens "
+"I<after> syscall-exit-stop, and at this point I<rax> almost never contains "
+"-B<ENOSYS>, the B<SIGTRAP> looks like \"syscall-stop which is not "
+"syscall-enter-stop\"; in other words, it looks like a \"stray "
+"syscall-exit-stop\" and can be detected this way.  But such detection is "
+"fragile and is best avoided."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1154
+msgid ""
+"Using the B<PTRACE_O_TRACESYSGOOD> option is the recommended method to "
+"distinquish syscall-stops from other kinds of ptrace-stops, since it is "
+"reliable and does not incur a performance penalty."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1165
+msgid ""
+"Syscall-enter-stop and syscall-exit-stop are indistinguishable from each "
+"other by the tracer.  The tracer needs to keep track of the sequence of "
+"ptrace-stops in order to not misinterpret syscall-enter-stop as "
+"syscall-exit-stop or vice versa.  The rule is that syscall-enter-stop is "
+"always followed by syscall-exit-stop, B<PTRACE_EVENT> stop or the tracee's "
+"death; no other kinds of ptrace-stop can occur in between."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1170
+msgid ""
+"If after syscall-enter-stop, the tracer uses a restarting command other than "
+"B<PTRACE_SYSCALL>, syscall-exit-stop is not generated."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1182
+msgid ""
+"B<PTRACE_GETSIGINFO> on syscall-stops returns B<SIGTRAP> in I<si_signo>, "
+"with I<si_code> set to B<SIGTRAP> or I<(SIGTRAP|0x80)>."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:1182
+#, no-wrap
+msgid "PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP stops"
+msgstr ""
+
+#
+#.  FIXME
+#.  document stops occurring with PTRACE_SINGLESTEP, PTRACE_SYSEMU,
+#.  PTRACE_SYSEMU_SINGLESTEP
+#. type: Plain text
+#: build/C/man2/ptrace.2:1188
+msgid "[Details of these kinds of stops are yet to be documented.]"
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:1188
+#, no-wrap
+msgid "Informational and restarting ptrace commands"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1196
+msgid ""
+"Most ptrace commands (all except B<PTRACE_ATTACH>, B<PTRACE_TRACEME>, and "
+"B<PTRACE_KILL>)  require the tracee to be in a ptrace-stop, otherwise they "
+"fail with B<ESRCH>."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1201
+msgid ""
+"When the tracee is in ptrace-stop, the tracer can read and write data to the "
+"tracee using informational commands.  These commands leave the tracee in "
+"ptrace-stopped state:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1211
+#, no-wrap
+msgid ""
+"    ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);\n"
+"    ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);\n"
+"    ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);\n"
+"    ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);\n"
+"    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);\n"
+"    ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);\n"
+"    ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);\n"
+"    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1223
+msgid ""
+"Note that some errors are not reported.  For example, setting signal "
+"information (I<siginfo>)  may have no effect in some ptrace-stops, yet the "
+"call may succeed (return 0 and not set I<errno>); querying "
+"B<PTRACE_GETEVENTMSG> may succeed and return some random value if current "
+"ptrace-stop is not documented as returning a meaningful event message."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1225
+msgid "The call"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1227
+#, no-wrap
+msgid "    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1236
+msgid ""
+"affects one tracee.  The tracee's current flags are replaced.  Flags are "
+"inherited by new tracees created and \"auto-attached\" via active "
+"B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or B<PTRACE_O_TRACECLONE> "
+"options."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1239
+msgid ""
+"Another group of commands makes the ptrace-stopped tracee run.  They have "
+"the form:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1241
+#, no-wrap
+msgid "    ptrace(cmd, pid, 0, sig);\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1261
+msgid ""
+"where I<cmd> is B<PTRACE_CONT>, B<PTRACE_DETACH>, B<PTRACE_SYSCALL>, "
+"B<PTRACE_SINGLESTEP>, B<PTRACE_SYSEMU>, or B<PTRACE_SYSEMU_SINGLESTEP.> If "
+"the tracee is in signal-delivery-stop, I<sig> is the signal to be injected "
+"(if it is nonzero).  Otherwise, I<sig> may be ignored.  (When restarting a "
+"tracee from a ptrace-stop other than signal-delivery-stop, recommended "
+"practice is to always pass 0 in I<sig .)>"
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:1261
+#, no-wrap
+msgid "Attaching and detaching"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1263
+msgid "A thread can be attached to the tracer using the call"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1265
+#, no-wrap
+msgid "    ptrace(PTRACE_ATTACH, pid, 0, 0);\n"
+msgstr ""
+
+#
+#.  FIXME: Describe how to attach to a thread which is already
+#.         group-stopped.
+#. type: Plain text
+#: build/C/man2/ptrace.2:1289
+msgid ""
+"This also sends B<SIGSTOP> to this thread.  If the tracer wants this "
+"B<SIGSTOP> to have no effect, it needs to suppress it.  Note that if other "
+"signals are concurrently sent to this thread during attach, the tracer may "
+"see the tracee enter signal-delivery-stop with other signal(s) first! The "
+"usual practice is to reinject these signals until B<SIGSTOP> is seen, then "
+"suppress B<SIGSTOP> injection.  The design bug here is that a ptrace attach "
+"and a concurrently delivered B<SIGSTOP> may race and the concurrent "
+"B<SIGSTOP> may be lost."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1296
+msgid ""
+"Since attaching sends B<SIGSTOP> and the tracer usually suppresses it, this "
+"may cause a stray I<EINTR> return from the currently executing system call "
+"in the tracee, as described in the \"signal injection and suppression\" "
+"section."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1298
+msgid "The request"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1300
+#, no-wrap
+msgid "    ptrace(PTRACE_TRACEME, 0, 0, 0);\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1306
+msgid ""
+"turns the calling thread into a tracee.  The thread continues to run "
+"(doesn't enter ptrace-stop).  A common practice is to follow the "
+"B<PTRACE_TRACEME> with"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1308
+#, no-wrap
+msgid "    raise(SIGSTOP);\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1311
+msgid ""
+"and allow the parent (which is our tracer now) to observe our "
+"signal-delivery-stop."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1335
+msgid ""
+"If the B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or "
+"B<PTRACE_O_TRACECLONE> options are in effect, then children created by, "
+"respectively, B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> flag, "
+"B<fork>(2)  or B<clone>(2)  with the exit signal set to B<SIGCHLD>, and "
+"other kinds of B<clone>(2), are automatically attached to the same tracer "
+"which traced their parent.  B<SIGSTOP> is delivered to the children, causing "
+"them to enter signal-delivery-stop after they exit the system call which "
+"created them."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1337
+msgid "Detaching of the tracee is performed by:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1339
+#, no-wrap
+msgid "    ptrace(PTRACE_DETACH, pid, 0, sig);\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1347
+msgid ""
+"B<PTRACE_DETACH> is a restarting operation; therefore it requires the tracee "
+"to be in ptrace-stop.  If the tracee is in signal-delivery-stop, a signal "
+"can be injected.  Otherwise, the I<sig> parameter may be silently ignored."
+msgstr ""
+
+#.  FIXME: Describe how to detach from a group-stopped tracee so that it
+#.         doesn't run, but continues to wait for SIGCONT.
+#. type: Plain text
+#: build/C/man2/ptrace.2:1371
+msgid ""
+"If the tracee is running when the tracer wants to detach it, the usual "
+"solution is to send B<SIGSTOP> (using B<tgkill>(2), to make sure it goes to "
+"the correct thread), wait for the tracee to stop in signal-delivery-stop for "
+"B<SIGSTOP> and then detach it (suppressing B<SIGSTOP> injection).  A design "
+"bug is that this can race with concurrent B<SIGSTOP>s.  Another complication "
+"is that the tracee may enter other ptrace-stops and needs to be restarted "
+"and waited for again, until B<SIGSTOP> is seen.  Yet another complication is "
+"to be sure that the tracee is not already ptrace-stopped, because no signal "
+"delivery happens while it is\\(emnot even B<SIGSTOP>."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1379
+msgid ""
+"If the tracer dies, all tracees are automatically detached and restarted, "
+"unless they were in group-stop.  Handling of restart from group-stop is "
+"currently buggy, but the \"as planned\" behavior is to leave tracee stopped "
+"and waiting for B<SIGCONT>.  If the tracee is restarted from "
+"signal-delivery-stop, the pending signal is injected."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:1379
+#, no-wrap
+msgid "execve(2) under ptrace"
+msgstr ""
+
+#.  clone(2) THREAD_CLONE says:
+#.      If  any  of the threads in a thread group performs an execve(2),
+#.      then all threads other than the thread group leader are terminated,
+#.      and the new program is executed in the thread group leader.
+#
+#.  In kernel 3.1 sources, see fs/exec.c::de_thread()
+#. type: Plain text
+#: build/C/man2/ptrace.2:1398
+msgid ""
+"When one thread in a multithreaded process calls B<execve>(2), the kernel "
+"destroys all other threads in the process, and resets the thread ID of the "
+"execing thread to the thread group ID (process ID).  (Or, to put things "
+"another way, when a multithreaded process does an B<execve>(2), at "
+"completion of the call, it appears as though the B<execve>(2)  occurred in "
+"the thread group leader, regardless of which thread did the B<execve>(2).)  "
+"This resetting of the thread ID looks very confusing to tracers:"
+msgstr ""
+
+#. type: IP
+#: build/C/man2/ptrace.2:1398 build/C/man2/ptrace.2:1408 build/C/man2/ptrace.2:1414 build/C/man2/ptrace.2:1422 build/C/man2/ptrace.2:1558
+#, no-wrap
+msgid "*"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1408
+msgid ""
+"All other threads stop in B<PTRACE_EVENT_EXIT> stop, if the "
+"B<PTRACE_O_TRACEEXIT> option was turned on.  Then all other threads except "
+"the thread group leader report death as if they exited via B<_exit>(2)  with "
+"exit code 0."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1414
+msgid ""
+"Then a B<PTRACE_EVENT_EXEC> stop happens, if the B<PTRACE_O_TRACEEXEC> "
+"option was turned on."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1422
+msgid ""
+"The execing tracee changes its thread ID while it is in the B<execve>(2).  "
+"(Remember, under ptrace, the \"pid\" returned from B<waitpid>(2), or fed "
+"into ptrace calls, is the tracee's thread ID.)  That is, the tracee's thread "
+"ID is reset to be the same as its process ID, which is the same as the "
+"thread group leader's thread ID."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1436
+msgid ""
+"If the thread group leader has reported its death by this time, it appears "
+"to the tracer that the dead thread leader \"reappears from nowhere\".  If "
+"the thread group leader was still alive, for the tracer this may look as if "
+"thread group leader returns from a different system call than it entered, or "
+"even \"returned from a system call even though it was not in any system "
+"call\".  If the thread group leader was not traced (or was traced by a "
+"different tracer), then during B<execve>(2)  it will appear as if it has "
+"become a tracee of the tracer of the execing tracee."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1439
+msgid ""
+"All of the above effects are the artifacts of the thread ID change in the "
+"tracee."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1463
+msgid ""
+"The B<PTRACE_O_TRACEEXEC> option is the recommended tool for dealing with "
+"this situation.  It enables B<PTRACE_EVENT_EXEC> stop, which occurs before "
+"B<execve>(2)  returns.  First, it enables B<PTRACE_EVENT_EXEC>-stop, which "
+"occurs before B<execve(2)> returns.  In this stop, the tracer can use "
+"B<PTRACE_GETEVENTMSG> to retrieve the tracee's former thread ID.  (This "
+"feature was introduced in Linux 3.0).  Second, the B<PTRACE_O_TRACEEXEC> "
+"option disables legacy B<SIGTRAP> generation on B<execve>(2)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1469
+msgid ""
+"When the tracer receives B<PTRACE_EVENT_EXEC> stop notification, it is "
+"guaranteed that except this tracee and the thread group leader, no other "
+"threads from the process are alive."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1477
+msgid ""
+"On receiving the B<PTRACE_EVENT_EXEC> stop notification, the tracer should "
+"clean up all its internal data structures describing the threads of this "
+"process, and retain only one data structure\\(emone which describes the "
+"single still running tracee, with"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1479
+#, no-wrap
+msgid "    thread ID == thread group ID == process id.\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1485
+msgid ""
+"Currently, there is no way to retrieve the former thread ID of the execing "
+"tracee.  If the tracer doesn't keep track of its tracees' thread group "
+"relations, it may be unable to know which tracee execed and therefore no "
+"longer exists under the old thread ID due to a thread ID change."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1489
+msgid "Example: two threads call B<execve>(2)  at the same time:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1500
+#, no-wrap
+msgid ""
+"*** we get syscall-entry-stop in thread 1: **\n"
+"PID1 execve(\"/bin/foo\", \"foo\" E<lt>unfinished ...E<gt>\n"
+"*** we issue PTRACE_SYSCALL for thread 1 **\n"
+"*** we get syscall-entry-stop in thread 2: **\n"
+"PID2 execve(\"/bin/bar\", \"bar\" E<lt>unfinished ...E<gt>\n"
+"*** we issue PTRACE_SYSCALL for thread 2 **\n"
+"*** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **\n"
+"*** we get syscall-exit-stop for PID0: **\n"
+"PID0 E<lt>... execve resumedE<gt> )             = 0\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1505
+msgid "In this situation, there is no way to know which B<execve>(2)  succeeded."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1527
+msgid ""
+"If the B<PTRACE_O_TRACEEXEC> option is I<not> in effect for the execing "
+"tracee, the kernel delivers an extra B<SIGTRAP> to the tracee after "
+"B<execve>(2)  returns.  This is an ordinary signal (similar to one which can "
+"be generated by I<kill -TRAP>), not a special kind of ptrace-stop.  "
+"Employing B<PTRACE_GETSIGINFO> for this signal returns I<si_code> set to 0 "
+"(I<SI_USER>).  This signal may be blocked by signal mask, and thus may be "
+"delivered (much) later."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1546
+msgid ""
+"Usually, the tracer (for example, B<strace>(1))  would not want to show this "
+"extra post-execve B<SIGTRAP> signal to the user, and would suppress its "
+"delivery to the tracee (if B<SIGTRAP> is set to B<SIG_DFL>, it is a killing "
+"signal).  However, determining I<which> B<SIGTRAP> to suppress is not easy.  "
+"Setting the B<PTRACE_O_TRACEEXEC> option and thus suppressing this extra "
+"B<SIGTRAP> is the recommended approach."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/ptrace.2:1546
+#, no-wrap
+msgid "Real parent"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1553
+msgid ""
+"The ptrace API (ab)uses the standard UNIX parent/child signaling over "
+"B<waitpid>(2).  This used to cause the real parent of the process to stop "
+"receiving several kinds of B<waitpid>(2)  notifications when the child "
+"process is traced by some other process."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1556
+msgid ""
+"Many of these bugs have been fixed, but as of Linux 2.6.38 several still "
+"exist; see BUGS below."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1558
+msgid "As of Linux 2.6.38, the following is believed to work correctly:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1566
+msgid ""
+"exit/death by signal is reported first to the tracer, then, when the tracer "
+"consumes the B<waitpid>(2)  result, to the real parent (to the real parent "
+"only when the whole multithreaded process exits).  If the tracer and the "
+"real parent are the same process, the report is sent only once."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1580
+msgid ""
+"On success, B<PTRACE_PEEK*> requests return the requested data, while other "
+"requests return zero.  On error, all requests return -1, and I<errno> is set "
+"appropriately.  Since the value returned by a successful B<PTRACE_PEEK*> "
+"request may be -1, the caller must clear I<errno> before the call, and then "
+"check it afterward to determine whether or not an error occurred."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1584
+msgid "(i386 only) There was an error with allocating or freeing a debug register."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1595
+msgid ""
+"There was an attempt to read from or write to an invalid area in the "
+"tracer's or the tracee's memory, probably because the area wasn't mapped or "
+"accessible.  Unfortunately, under Linux, different variations of this fault "
+"will return B<EIO> or B<EFAULT> more or less arbitrarily."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1598
+msgid "An attempt was made to set an invalid option."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1605
+msgid ""
+"I<request> is invalid, or an attempt was made to read from or write to an "
+"invalid area in the tracer's or the tracee's memory, or there was a "
+"word-alignment violation, or an invalid signal was specified during a "
+"restart request."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1618
+msgid ""
+"The specified process cannot be traced.  This could be because the tracer "
+"has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); "
+"unprivileged processes cannot trace processes that they cannot send signals "
+"to or those running set-user-ID/set-group-ID programs, for obvious reasons.  "
+"Alternatively, the process may already be being traced, or (on kernels "
+"before 2.6.26) be B<init>(8)  (PID 1)."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/ptrace.2:1618 build/C/man2/quotactl.2:459 build/C/man2/quotactl.2:502
+#, no-wrap
+msgid "B<ESRCH>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1623
+msgid ""
+"The specified process does not exist, or is not currently being traced by "
+"the caller, or is not stopped (for requests that require a stopped tracee)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1625
+msgid "SVr4, 4.3BSD."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1638
+msgid ""
+"Although arguments to B<ptrace>()  are interpreted according to the "
+"prototype given, glibc currently declares B<ptrace>()  as a variadic "
+"function with only the I<request> argument fixed.  This means that unneeded "
+"trailing arguments may be omitted, though doing so makes use of undocumented "
+"B<gcc>(1)  behavior."
+msgstr ""
+
+#.  See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
+#. type: Plain text
+#: build/C/man2/ptrace.2:1643
+msgid ""
+"In Linux kernels before 2.6.26, B<init>(8), the process with PID 1, may not "
+"be traced."
+msgstr ""
+
+#.  See http://lkml.org/lkml/2008/5/8/375
+#. type: Plain text
+#: build/C/man2/ptrace.2:1650
+msgid ""
+"The layout of the contents of memory and the USER area are quite "
+"operating-system- and architecture-specific.  The offset supplied, and the "
+"data returned, might not entirely match with the definition of I<struct "
+"user>."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1653
+msgid ""
+"The size of a \"word\" is determined by the operating-system variant (e.g., "
+"for 32-bit Linux it is 32 bits, etc.)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1661
+msgid ""
+"This page documents the way the B<ptrace>()  call works currently in Linux.  "
+"Its behavior differs noticeably on other flavors of UNIX.  In any case, use "
+"of B<ptrace>()  is highly specific to the operating system and architecture."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1672
+msgid ""
+"On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
+"different value than the one for 2.4.  This leads to applications compiled "
+"with 2.6 kernel headers failing when run on 2.4 kernels.  This can be worked "
+"around by redefining B<PTRACE_SETOPTIONS> to B<PTRACE_OLDSETOPTIONS>, if "
+"that is defined."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1675
+msgid ""
+"Group-stop notifications are sent to the tracer, but not to real parent.  "
+"Last confirmed on 2.6.38.6."
+msgstr ""
+
+#.  Note from Denys Vlasenko:
+#.      Here "exits" means any kind of death - _exit, exit_group,
+#.      signal death. Signal death and exit_group cases are trivial,
+#.      though: since signal death and exit_group kill all other threads
+#.      too, "until all other threads exit" thing happens rather soon
+#.      in these cases. Therefore, only _exit presents observably
+#.      puzzling behavior to ptrace users: thread leader _exit's,
+#.      but WIFEXITED isn't reported! We are trying to explain here
+#.      why it is so.
+#.   FIXME: ^^^ need to test/verify this scenario
+#. type: Plain text
+#: build/C/man2/ptrace.2:1706
+msgid ""
+"If a thread group leader is traced and exits by calling B<_exit>(2), a "
+"B<PTRACE_EVENT_EXIT> stop will happen for it (if requested), but the "
+"subsequent B<WIFEXITED> notification will not be delivered until all other "
+"threads exit.  As explained above, if one of other threads calls "
+"B<execve>(2), the death of the thread group leader will I<never> be "
+"reported.  If the execed thread is not traced by this tracer, the tracer "
+"will never know that B<execve>(2)  happened.  One possible workaround is to "
+"B<PTRACE_DETACH> the thread group leader instead of restarting it in this "
+"case.  Last confirmed on 2.6.38.6."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/ptrace.2:1716
+msgid ""
+"A B<SIGKILL> signal may still cause a B<PTRACE_EVENT_EXIT> stop before "
+"actual signal death.  This may be changed in the future; B<SIGKILL> is meant "
+"to always immediately kill tasks even under ptrace.  Last confirmed on "
+"2.6.38.6."
 msgstr ""
 
 #. type: Plain text
-#: build/C/man2/ptrace.2:539
+#: build/C/man2/ptrace.2:1730
 msgid ""
-"B<gdb>(1), B<strace>(1), B<execve>(2), B<fork>(2), B<signal>(2), B<wait>(2), "
-"B<exec>(3), B<capabilities>(7)"
+"B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), "
+"B<gettid>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), B<waitpid>(2), "
+"B<exec>(3), B<capabilities>(7), B<signal>(7)"
 msgstr ""
 
 #. type: TH