msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2012-05-28 07:17+0900\n"
+"POT-Creation-Date: 2013-03-22 01:06+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"
"Content-Transfer-Encoding: 8bit\n"
#. type: TH
-#: build/C/man3/CPU_SET.3:25
+#: build/C/man3/CPU_SET.3:27
#, no-wrap
msgid "CPU_SET"
msgstr ""
#. type: TH
-#: build/C/man3/CPU_SET.3:25
+#: build/C/man3/CPU_SET.3:27
#, no-wrap
msgid "2012-03-15"
msgstr ""
#. type: TH
-#: build/C/man3/CPU_SET.3:25 build/C/man2/clone.2:43 build/C/man2/sched_get_priority_max.2:30 build/C/man3/sched_getcpu.3:24 build/C/man2/sched_rr_get_interval.2:30 build/C/man2/sched_setaffinity.2:35 build/C/man2/sched_setparam.2:31 build/C/man2/sched_setscheduler.2:47 build/C/man2/sched_yield.2:30 build/C/man2/setns.2:4 build/C/man2/unshare.2:17
+#: build/C/man3/CPU_SET.3:27 build/C/man2/clone.2:45 build/C/man2/kcmp.2:28 build/C/man2/sched_get_priority_max.2:29 build/C/man3/sched_getcpu.3:26 build/C/man2/sched_rr_get_interval.2:29 build/C/man2/sched_setaffinity.2:34 build/C/man2/sched_setparam.2:30 build/C/man2/sched_setscheduler.2:46 build/C/man2/sched_yield.2:29 build/C/man2/setns.2:8 build/C/man2/unshare.2:20
#, no-wrap
msgid "Linux"
msgstr ""
#. type: TH
-#: build/C/man3/CPU_SET.3:25 build/C/man2/clone.2:43 build/C/man2/sched_get_priority_max.2:30 build/C/man3/sched_getcpu.3:24 build/C/man2/sched_rr_get_interval.2:30 build/C/man2/sched_setaffinity.2:35 build/C/man2/sched_setparam.2:31 build/C/man2/sched_setscheduler.2:47 build/C/man2/sched_yield.2:30 build/C/man2/setns.2:4 build/C/man2/unshare.2:17
+#: build/C/man3/CPU_SET.3:27 build/C/man2/clone.2:45 build/C/man2/kcmp.2:28 build/C/man2/sched_get_priority_max.2:29 build/C/man3/sched_getcpu.3:26 build/C/man2/sched_rr_get_interval.2:29 build/C/man2/sched_setaffinity.2:34 build/C/man2/sched_setparam.2:30 build/C/man2/sched_setscheduler.2:46 build/C/man2/sched_yield.2:29 build/C/man2/setns.2:8 build/C/man2/unshare.2:20
#, no-wrap
msgid "Linux Programmer's Manual"
msgstr ""
#. type: SH
-#: build/C/man3/CPU_SET.3:26 build/C/man2/clone.2:44 build/C/man2/sched_get_priority_max.2:31 build/C/man3/sched_getcpu.3:25 build/C/man2/sched_rr_get_interval.2:31 build/C/man2/sched_setaffinity.2:36 build/C/man2/sched_setparam.2:32 build/C/man2/sched_setscheduler.2:48 build/C/man2/sched_yield.2:31 build/C/man2/setns.2:5 build/C/man2/unshare.2:18
+#: build/C/man3/CPU_SET.3:28 build/C/man2/clone.2:46 build/C/man2/kcmp.2:29 build/C/man2/sched_get_priority_max.2:30 build/C/man3/sched_getcpu.3:27 build/C/man2/sched_rr_get_interval.2:30 build/C/man2/sched_setaffinity.2:35 build/C/man2/sched_setparam.2:31 build/C/man2/sched_setscheduler.2:47 build/C/man2/sched_yield.2:30 build/C/man2/setns.2:9 build/C/man2/unshare.2:21
#, no-wrap
msgid "NAME"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:33
+#: build/C/man3/CPU_SET.3:35
msgid ""
"CPU_SET, CPU_CLR, CPU_ISSET, CPU_ZERO, CPU_COUNT, CPU_AND, CPU_OR, CPU_XOR, "
"CPU_EQUAL, CPU_ALLOC, CPU_ALLOC_SIZE, CPU_FREE, CPU_SET_S, CPU_CLR_S, "
msgstr ""
#. type: SH
-#: build/C/man3/CPU_SET.3:33 build/C/man2/clone.2:46 build/C/man2/sched_get_priority_max.2:33 build/C/man3/sched_getcpu.3:27 build/C/man2/sched_rr_get_interval.2:33 build/C/man2/sched_setaffinity.2:39 build/C/man2/sched_setparam.2:34 build/C/man2/sched_setscheduler.2:51 build/C/man2/sched_yield.2:33 build/C/man2/setns.2:7 build/C/man2/unshare.2:20
+#: build/C/man3/CPU_SET.3:35 build/C/man2/clone.2:48 build/C/man2/kcmp.2:31 build/C/man2/sched_get_priority_max.2:32 build/C/man3/sched_getcpu.3:29 build/C/man2/sched_rr_get_interval.2:32 build/C/man2/sched_setaffinity.2:38 build/C/man2/sched_setparam.2:33 build/C/man2/sched_setscheduler.2:50 build/C/man2/sched_yield.2:32 build/C/man2/setns.2:11 build/C/man2/unshare.2:23
#, no-wrap
msgid "SYNOPSIS"
msgstr ""
#. Actually _BSD_SOURCE || _SVID_SOURCE
#. FIXME See http://sources.redhat.com/bugzilla/show_bug.cgi?id=4749
#. type: Plain text
-#: build/C/man3/CPU_SET.3:37 build/C/man2/clone.2:52 build/C/man2/sched_setaffinity.2:43 build/C/man2/setns.2:11 build/C/man2/unshare.2:26
+#: build/C/man3/CPU_SET.3:39 build/C/man2/clone.2:54 build/C/man2/sched_setaffinity.2:42 build/C/man2/setns.2:15 build/C/man2/unshare.2:29
#, no-wrap
msgid ""
"B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:39
+#: build/C/man3/CPU_SET.3:41
#, no-wrap
msgid "B<void CPU_ZERO(cpu_set_t *>I<set>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:43
+#: build/C/man3/CPU_SET.3:45
#, no-wrap
msgid ""
"B<void CPU_SET(int >I<cpu>B<, cpu_set_t *>I<set>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:45
+#: build/C/man3/CPU_SET.3:47
#, no-wrap
msgid "B<int CPU_COUNT(cpu_set_t *>I<set>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:52
+#: build/C/man3/CPU_SET.3:54
#, no-wrap
msgid ""
"B<void CPU_AND(cpu_set_t *>I<destset>B<,>\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:54
+#: build/C/man3/CPU_SET.3:56
#, no-wrap
msgid "B<int CPU_EQUAL(cpu_set_t *>I<set1>B<, cpu_set_t *>I<set2>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:58
+#: build/C/man3/CPU_SET.3:60
#, no-wrap
msgid ""
"B<cpu_set_t *CPU_ALLOC(int >I<num_cpus>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:60
+#: build/C/man3/CPU_SET.3:62
#, no-wrap
msgid "B<void CPU_ZERO_S(size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:64
+#: build/C/man3/CPU_SET.3:66
#, no-wrap
msgid ""
"B<void CPU_SET_S(int >I<cpu>B<, size_t >I<setsize>B<, cpu_set_t "
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:66
+#: build/C/man3/CPU_SET.3:68
#, no-wrap
msgid "B<int CPU_COUNT_S(size_t >I<setsize>B<, cpu_set_t *>I<set>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:73
+#: build/C/man3/CPU_SET.3:75
#, no-wrap
msgid ""
"B<void CPU_AND_S(size_t >I<setsize>B<, cpu_set_t *>I<destset>B<,>\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:76
+#: build/C/man3/CPU_SET.3:78
#, no-wrap
msgid ""
"B<int CPU_EQUAL_S(size_t >I<setsize>B<, cpu_set_t *>I<set1>B<, cpu_set_t "
msgstr ""
#. type: SH
-#: build/C/man3/CPU_SET.3:77 build/C/man2/clone.2:58 build/C/man2/sched_get_priority_max.2:39 build/C/man3/sched_getcpu.3:35 build/C/man2/sched_rr_get_interval.2:37 build/C/man2/sched_setaffinity.2:50 build/C/man2/sched_setparam.2:48 build/C/man2/sched_setscheduler.2:67 build/C/man2/sched_yield.2:37 build/C/man2/setns.2:14 build/C/man2/unshare.2:29
+#: build/C/man3/CPU_SET.3:79 build/C/man2/clone.2:60 build/C/man2/kcmp.2:41 build/C/man2/sched_get_priority_max.2:38 build/C/man3/sched_getcpu.3:37 build/C/man2/sched_rr_get_interval.2:36 build/C/man2/sched_setaffinity.2:49 build/C/man2/sched_setparam.2:47 build/C/man2/sched_setscheduler.2:66 build/C/man2/sched_yield.2:36 build/C/man2/setns.2:18 build/C/man2/unshare.2:32
#, no-wrap
msgid "DESCRIPTION"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:84
+#: build/C/man3/CPU_SET.3:86
msgid ""
"The I<cpu_set_t> data structure represents a set of CPUs. CPU sets are used "
"by B<sched_setaffinity>(2) and similar interfaces."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:91
+#: build/C/man3/CPU_SET.3:93
msgid ""
"The I<cpu_set_t> data type is implemented as a bitset. However, the data "
"structure treated as considered opaque: all manipulation of CPU sets should "
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:94
+#: build/C/man3/CPU_SET.3:96
msgid "The following macros are provided to operate on the CPU set I<set>:"
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:94
+#: build/C/man3/CPU_SET.3:96
#, no-wrap
msgid "B<CPU_ZERO>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:99
+#: build/C/man3/CPU_SET.3:101
msgid "Clears I<set>, so that it contains no CPUs."
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:99
+#: build/C/man3/CPU_SET.3:101
#, no-wrap
msgid "B<CPU_SET>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:105
+#: build/C/man3/CPU_SET.3:107
msgid "Add CPU I<cpu> to I<set>."
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:105
+#: build/C/man3/CPU_SET.3:107
#, no-wrap
msgid "B<CPU_CLR>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:111
+#: build/C/man3/CPU_SET.3:113
msgid "Remove CPU I<cpu> from I<set>."
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:111
+#: build/C/man3/CPU_SET.3:113
#, no-wrap
msgid "B<CPU_ISSET>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:117
+#: build/C/man3/CPU_SET.3:119
msgid "Test to see if CPU I<cpu> is a member of I<set>."
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:117
+#: build/C/man3/CPU_SET.3:119
#, no-wrap
msgid "B<CPU_COUNT>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:121
+#: build/C/man3/CPU_SET.3:123
msgid "Return the number of CPUs in I<set>."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:126
+#: build/C/man3/CPU_SET.3:128
msgid ""
"Where a I<cpu> argument is specified, it should not produce side effects, "
"since the above macros may evaluate the argument more than once."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:137
+#: build/C/man3/CPU_SET.3:139
msgid ""
"The first available CPU on the system corresponds to a I<cpu> value of 0, "
"the next CPU corresponds to a I<cpu> value of 1, and so on. The constant "
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:139
+#: build/C/man3/CPU_SET.3:141
msgid "The following macros perform logical operations on CPU sets:"
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:139
+#: build/C/man3/CPU_SET.3:141
#, no-wrap
msgid "B<CPU_AND>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:148
+#: build/C/man3/CPU_SET.3:150
msgid ""
"Store the intersection of the sets I<srcset1> and I<srcset2> in I<destset> "
"(which may be one of the source sets)."
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:148
+#: build/C/man3/CPU_SET.3:150
#, no-wrap
msgid "B<CPU_OR>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:157
+#: build/C/man3/CPU_SET.3:159
msgid ""
"Store the union of the sets I<srcset1> and I<srcset2> in I<destset> (which "
"may be one of the source sets)."
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:157
+#: build/C/man3/CPU_SET.3:159
#, no-wrap
msgid "B<CPU_XOR>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:171
+#: build/C/man3/CPU_SET.3:173
msgid ""
"Store the XOR of the sets I<srcset1> and I<srcset2> in I<destset> (which may "
"be one of the source sets). The XOR means the set of CPUs that are in "
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:171
+#: build/C/man3/CPU_SET.3:173
#, no-wrap
msgid "B<CPU_EQUAL>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:174
+#: build/C/man3/CPU_SET.3:176
msgid "Test whether two CPU set contain exactly the same CPUs."
msgstr ""
#. type: SS
-#: build/C/man3/CPU_SET.3:174
+#: build/C/man3/CPU_SET.3:176
#, no-wrap
msgid "Dynamically sized CPU sets"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:180
+#: build/C/man3/CPU_SET.3:182
msgid ""
"Because some applications may require the ability to dynamically size CPU "
"sets (e.g., to allocate sets larger than that defined by the standard "
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:182
+#: build/C/man3/CPU_SET.3:184
msgid "The following macros are used to allocate and deallocate CPU sets:"
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:182
+#: build/C/man3/CPU_SET.3:184
#, no-wrap
msgid "B<CPU_ALLOC>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:187
+#: build/C/man3/CPU_SET.3:189
msgid ""
"Allocate a CPU set large enough to hold CPUs in the range 0 to "
"I<num_cpus-1>."
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:187
+#: build/C/man3/CPU_SET.3:189
#, no-wrap
msgid "B<CPU_ALLOC_SIZE>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:197
+#: build/C/man3/CPU_SET.3:199
msgid ""
"Return the size in bytes of the CPU set that would be needed to hold CPUs in "
"the range 0 to I<num_cpus-1>. This macro provides the value that can be "
msgstr ""
#. type: TP
-#: build/C/man3/CPU_SET.3:197
+#: build/C/man3/CPU_SET.3:199
#, no-wrap
msgid "B<CPU_FREE>()"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:201
+#: build/C/man3/CPU_SET.3:203
msgid "Free a CPU set previously allocated by B<CPU_ALLOC>()."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:208
+#: build/C/man3/CPU_SET.3:210
msgid ""
"The macros whose names end with \"_S\" are the analogs of the similarly "
"named macros without the suffix. These macros perform the same tasks as "
msgstr ""
#. type: SH
-#: build/C/man3/CPU_SET.3:208 build/C/man2/clone.2:792 build/C/man2/sched_get_priority_max.2:87 build/C/man3/sched_getcpu.3:38 build/C/man2/sched_rr_get_interval.2:74 build/C/man2/sched_setaffinity.2:108 build/C/man2/sched_setparam.2:88 build/C/man2/sched_setscheduler.2:423 build/C/man2/sched_yield.2:42 build/C/man2/setns.2:66 build/C/man2/unshare.2:183
+#: build/C/man3/CPU_SET.3:210 build/C/man2/clone.2:806 build/C/man2/kcmp.2:124 build/C/man2/sched_get_priority_max.2:86 build/C/man3/sched_getcpu.3:40 build/C/man2/sched_rr_get_interval.2:73 build/C/man2/sched_setaffinity.2:107 build/C/man2/sched_setparam.2:87 build/C/man2/sched_setscheduler.2:422 build/C/man2/sched_yield.2:41 build/C/man2/setns.2:70 build/C/man2/unshare.2:189
#, no-wrap
msgid "RETURN VALUE"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:217
+#: build/C/man3/CPU_SET.3:219
msgid ""
"B<CPU_ISSET>() and B<CPU_ISSET_S>() return nonzero if I<cpu> is in I<set>; "
"otherwise, it returns 0."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:223
+#: build/C/man3/CPU_SET.3:225
msgid "B<CPU_COUNT>() and B<CPU_COUNT_S>() return the number of CPUs in I<set>."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:228
+#: build/C/man3/CPU_SET.3:230
msgid ""
"B<CPU_EQUAL>() and B<CPU_EQUAL_S>() return nonzero if the two CPU sets are "
"equal; otherwise it returns 0."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:233
+#: build/C/man3/CPU_SET.3:235
msgid ""
"B<CPU_ALLOC>() returns a pointer on success, or NULL on failure. (Errors "
"are as for B<malloc>(3).)"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:237
+#: build/C/man3/CPU_SET.3:239
msgid ""
"B<CPU_ALLOC_SIZE>() returns the number of bytes required to store a CPU set "
"of the specified cardinality."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:239
+#: build/C/man3/CPU_SET.3:241
msgid "The other functions do not return a value."
msgstr ""
#. type: SH
-#: build/C/man3/CPU_SET.3:239 build/C/man2/clone.2:909 build/C/man3/sched_getcpu.3:50 build/C/man2/sched_setaffinity.2:149 build/C/man2/setns.2:93 build/C/man2/unshare.2:200
+#: build/C/man3/CPU_SET.3:241 build/C/man2/clone.2:923 build/C/man2/kcmp.2:195 build/C/man3/sched_getcpu.3:52 build/C/man2/sched_setaffinity.2:148 build/C/man2/setns.2:97 build/C/man2/unshare.2:206
#, no-wrap
msgid "VERSIONS"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:247
+#: build/C/man3/CPU_SET.3:249
msgid ""
"The B<CPU_ZERO>(), B<CPU_SET>(), B<CPU_CLR>(), and B<CPU_ISSET>() macros "
"were added in glibc 2.3.3."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:250
+#: build/C/man3/CPU_SET.3:252
msgid "B<CPU_COUNT>() first appeared in glibc 2.6."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:268
+#: build/C/man3/CPU_SET.3:270
msgid ""
"B<CPU_AND>(), B<CPU_OR>(), B<CPU_XOR>(), B<CPU_EQUAL>(), B<CPU_ALLOC>(), "
"B<CPU_ALLOC_SIZE>(), B<CPU_FREE>(), B<CPU_ZERO_S>(), B<CPU_SET_S>(), "
msgstr ""
#. type: SH
-#: build/C/man3/CPU_SET.3:268 build/C/man2/clone.2:916 build/C/man2/sched_get_priority_max.2:101 build/C/man3/sched_getcpu.3:52 build/C/man2/sched_rr_get_interval.2:95 build/C/man2/sched_setaffinity.2:160 build/C/man2/sched_setparam.2:111 build/C/man2/sched_setscheduler.2:445 build/C/man2/sched_yield.2:53 build/C/man2/setns.2:98 build/C/man2/unshare.2:204
+#: build/C/man3/CPU_SET.3:270 build/C/man2/clone.2:930 build/C/man2/kcmp.2:199 build/C/man2/sched_get_priority_max.2:100 build/C/man3/sched_getcpu.3:54 build/C/man2/sched_rr_get_interval.2:94 build/C/man2/sched_setaffinity.2:159 build/C/man2/sched_setparam.2:110 build/C/man2/sched_setscheduler.2:444 build/C/man2/sched_yield.2:52 build/C/man2/setns.2:102 build/C/man2/unshare.2:210
#, no-wrap
msgid "CONFORMING TO"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:270
+#: build/C/man3/CPU_SET.3:272
msgid "These interfaces are Linux-specific."
msgstr ""
#. type: SH
-#: build/C/man3/CPU_SET.3:270 build/C/man2/clone.2:923 build/C/man3/sched_getcpu.3:55 build/C/man2/sched_rr_get_interval.2:97 build/C/man2/sched_setaffinity.2:162 build/C/man2/sched_setscheduler.2:448 build/C/man2/sched_yield.2:55 build/C/man2/setns.2:102 build/C/man2/unshare.2:208
+#: build/C/man3/CPU_SET.3:272 build/C/man2/clone.2:937 build/C/man2/kcmp.2:202 build/C/man3/sched_getcpu.3:57 build/C/man2/sched_rr_get_interval.2:96 build/C/man2/sched_setaffinity.2:161 build/C/man2/sched_setparam.2:112 build/C/man2/sched_setscheduler.2:447 build/C/man2/sched_yield.2:54 build/C/man2/setns.2:106 build/C/man2/unshare.2:214
#, no-wrap
msgid "NOTES"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:273
+#: build/C/man3/CPU_SET.3:275
msgid "To duplicate a CPU set, use B<memcpy>(3)."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:280
+#: build/C/man3/CPU_SET.3:282
msgid ""
"Since CPU sets are bitsets allocated in units of long words, the actual "
"number of CPUs in a dynamically allocated CPU set will be rounded up to the "
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:292
+#: build/C/man3/CPU_SET.3:294
msgid ""
"Notwithstanding the similarity in the names, note that the constant "
"B<CPU_SETSIZE> indicates the number of CPUs in the I<cpu_set_t> data type "
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:298
+#: build/C/man3/CPU_SET.3:300
msgid ""
"The data types for arguments and return values shown in the SYNOPSIS are "
"hints what about is expected in each case. However, since these interfaces "
msgstr ""
#. type: SH
-#: build/C/man3/CPU_SET.3:298 build/C/man2/clone.2:970 build/C/man2/sched_setscheduler.2:509 build/C/man2/setns.2:108
+#: build/C/man3/CPU_SET.3:300 build/C/man2/clone.2:984 build/C/man2/sched_setscheduler.2:530
#, no-wrap
msgid "BUGS"
msgstr ""
#. http://sourceware.org/bugzilla/show_bug.cgi?id=7029
#. type: Plain text
-#: build/C/man3/CPU_SET.3:310
+#: build/C/man3/CPU_SET.3:312
msgid ""
"On 32-bit platforms with glibc 2.8 and earlier, B<CPU_ALLOC>() allocates "
"twice as much space as is required, and B<CPU_ALLOC_SIZE>() returns a value "
msgstr ""
#. type: SH
-#: build/C/man3/CPU_SET.3:310
+#: build/C/man3/CPU_SET.3:312 build/C/man2/clone.2:1026 build/C/man2/setns.2:112
#, no-wrap
msgid "EXAMPLE"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:313
+#: build/C/man3/CPU_SET.3:315
msgid ""
"The following program demonstrates the use of some of the macros used for "
"dynamically allocated CPU sets."
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:321
+#: build/C/man3/CPU_SET.3:323
#, no-wrap
msgid ""
"#define _GNU_SOURCE\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:328
+#: build/C/man3/CPU_SET.3:330
#, no-wrap
msgid ""
"int\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:333
+#: build/C/man3/CPU_SET.3:335
#, no-wrap
msgid ""
" if (argc E<lt> 2) {\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:335
+#: build/C/man3/CPU_SET.3:337
#, no-wrap
msgid " num_cpus = atoi(argv[1]);\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:341
+#: build/C/man3/CPU_SET.3:343
#, no-wrap
msgid ""
" cpusetp = CPU_ALLOC(num_cpus);\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:343
+#: build/C/man3/CPU_SET.3:345
#, no-wrap
msgid " size = CPU_ALLOC_SIZE(num_cpus);\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:347
+#: build/C/man3/CPU_SET.3:349
#, no-wrap
msgid ""
" CPU_ZERO_S(size, cpusetp);\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:349
+#: build/C/man3/CPU_SET.3:351
#, no-wrap
msgid " printf(\"CPU_COUNT() of set: %d\\en\", CPU_COUNT_S(size, cpusetp));\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:353
+#: build/C/man3/CPU_SET.3:355
#, no-wrap
msgid ""
" CPU_FREE(cpusetp);\n"
msgstr ""
#. type: SH
-#: build/C/man3/CPU_SET.3:354 build/C/man2/clone.2:1012 build/C/man2/sched_get_priority_max.2:103 build/C/man3/sched_getcpu.3:75 build/C/man2/sched_rr_get_interval.2:126 build/C/man2/sched_setaffinity.2:215 build/C/man2/sched_setparam.2:113 build/C/man2/sched_setscheduler.2:517 build/C/man2/sched_yield.2:79 build/C/man2/setns.2:116 build/C/man2/unshare.2:244
+#: build/C/man3/CPU_SET.3:356 build/C/man2/clone.2:1124 build/C/man2/kcmp.2:219 build/C/man2/sched_get_priority_max.2:102 build/C/man3/sched_getcpu.3:77 build/C/man2/sched_rr_get_interval.2:125 build/C/man2/sched_setaffinity.2:214 build/C/man2/sched_setparam.2:118 build/C/man2/sched_setscheduler.2:538 build/C/man2/sched_yield.2:78 build/C/man2/setns.2:199 build/C/man2/unshare.2:248
#, no-wrap
msgid "SEE ALSO"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:359
+#: build/C/man3/CPU_SET.3:361
msgid ""
"B<sched_setaffinity>(2), B<pthread_attr_setaffinity_np>(3), "
"B<pthread_setaffinity_np>(3), B<cpuset>(7)"
msgstr ""
#. type: SH
-#: build/C/man3/CPU_SET.3:359 build/C/man2/clone.2:1024 build/C/man2/sched_get_priority_max.2:113 build/C/man3/sched_getcpu.3:77 build/C/man2/sched_rr_get_interval.2:132 build/C/man2/sched_setaffinity.2:231 build/C/man2/sched_setparam.2:127 build/C/man2/sched_setscheduler.2:542 build/C/man2/sched_yield.2:85 build/C/man2/setns.2:122 build/C/man2/unshare.2:249
+#: build/C/man3/CPU_SET.3:361 build/C/man2/clone.2:1138 build/C/man2/kcmp.2:222 build/C/man2/sched_get_priority_max.2:114 build/C/man3/sched_getcpu.3:79 build/C/man2/sched_rr_get_interval.2:131 build/C/man2/sched_setaffinity.2:233 build/C/man2/sched_setparam.2:134 build/C/man2/sched_setscheduler.2:567 build/C/man2/sched_yield.2:84 build/C/man2/setns.2:205 build/C/man2/unshare.2:257
#, no-wrap
msgid "COLOPHON"
msgstr ""
#. type: Plain text
-#: build/C/man3/CPU_SET.3:366 build/C/man2/clone.2:1031 build/C/man2/sched_get_priority_max.2:120 build/C/man3/sched_getcpu.3:84 build/C/man2/sched_rr_get_interval.2:139 build/C/man2/sched_setaffinity.2:238 build/C/man2/sched_setparam.2:134 build/C/man2/sched_setscheduler.2:549 build/C/man2/sched_yield.2:92 build/C/man2/setns.2:129 build/C/man2/unshare.2:256
+#: build/C/man3/CPU_SET.3:368 build/C/man2/clone.2:1145 build/C/man2/kcmp.2:229 build/C/man2/sched_get_priority_max.2:121 build/C/man3/sched_getcpu.3:86 build/C/man2/sched_rr_get_interval.2:138 build/C/man2/sched_setaffinity.2:240 build/C/man2/sched_setparam.2:141 build/C/man2/sched_setscheduler.2:574 build/C/man2/sched_yield.2:91 build/C/man2/setns.2:212 build/C/man2/unshare.2:264
msgid ""
-"This page is part of release 3.41 of the Linux I<man-pages> project. A "
+"This page is part of release 3.50 of the Linux I<man-pages> project. A "
"description of the project, and information about reporting bugs, can be "
"found at http://www.kernel.org/doc/man-pages/."
msgstr ""
#. type: TH
-#: build/C/man2/clone.2:43
+#: build/C/man2/clone.2:45
#, no-wrap
msgid "CLONE"
msgstr ""
#. type: TH
-#: build/C/man2/clone.2:43
+#: build/C/man2/clone.2:45 build/C/man2/setns.2:8
#, no-wrap
-msgid "2011-09-08"
+msgid "2013-01-01"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:46
+#: build/C/man2/clone.2:48
msgid "clone, __clone2 - create a child process"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:57
+#: build/C/man2/clone.2:59
#, no-wrap
msgid ""
"B<int clone(int (*>I<fn>B<)(void *), void *>I<child_stack>B<,>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:69
+#: build/C/man2/clone.2:71
msgid ""
"B<clone>() creates a new process, in a manner similar to B<fork>(2). It is "
"actually a library function layered on top of the underlying B<clone>() "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:81
+#: build/C/man2/clone.2:83
msgid ""
"Unlike B<fork>(2), these calls allow the child process to share parts of its "
"execution context with the calling process, such as the memory space, the "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:86
+#: build/C/man2/clone.2:88
msgid ""
"The main use of B<clone>() is to implement threads: multiple threads of "
"control in a program that run concurrently in a shared memory space."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:107
+#: build/C/man2/clone.2:108
msgid ""
"When the child process is created with B<clone>(), it executes the function "
-"application I<fn>(I<arg>). (This differs from B<fork>(2), where execution "
-"continues in the child from the point of the B<fork>(2) call.) The I<fn> "
-"argument is a pointer to a function that is called by the child process at "
-"the beginning of its execution. The I<arg> argument is passed to the I<fn> "
-"function."
+"I<fn>(I<arg>). (This differs from B<fork>(2), where execution continues in "
+"the child from the point of the B<fork>(2) call.) The I<fn> argument is a "
+"pointer to a function that is called by the child process at the beginning "
+"of its execution. The I<arg> argument is passed to the I<fn> function."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:117
+#: build/C/man2/clone.2:118
msgid ""
"When the I<fn>(I<arg>) function application returns, the child process "
"terminates. The integer returned by I<fn> is the exit code for the child "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:133
+#: build/C/man2/clone.2:134
msgid ""
"The I<child_stack> argument specifies the location of the stack used by the "
"child process. Since the child and calling process may share memory, it is "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:149
+#: build/C/man2/clone.2:150
msgid ""
"The low byte of I<flags> contains the number of the I<termination signal> "
"sent to the parent when the child dies. If this signal is specified as "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:154
+#: build/C/man2/clone.2:155
msgid ""
"I<flags> may also be bitwise-or'ed with zero or more of the following "
"constants, in order to specify what is shared between the calling process "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:154
+#: build/C/man2/clone.2:155
#, no-wrap
msgid "B<CLONE_CHILD_CLEARTID> (since Linux 2.5.49)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:164
+#: build/C/man2/clone.2:165
msgid ""
"Erase child thread ID at location I<ctid> in child memory when the child "
"exits, and do a wakeup on the futex at that address. The address involved "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:164
+#: build/C/man2/clone.2:165
#, no-wrap
msgid "B<CLONE_CHILD_SETTID> (since Linux 2.5.49)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:169
+#: build/C/man2/clone.2:170
msgid "Store child thread ID at location I<ctid> in child memory."
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:169 build/C/man2/unshare.2:53
+#: build/C/man2/clone.2:170
#, no-wrap
-msgid "B<CLONE_FILES>"
+msgid "B<CLONE_FILES> (since Linux 2.0)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:182
+#: build/C/man2/clone.2:183
msgid ""
"If B<CLONE_FILES> is set, the calling process and the child process share "
"the same file descriptor table. Any file descriptor created by the calling "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:196
+#: build/C/man2/clone.2:197
msgid ""
"If B<CLONE_FILES> is not set, the child process inherits a copy of all file "
"descriptors opened in the calling process at the time of B<clone>(). (The "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:196 build/C/man2/unshare.2:61
+#: build/C/man2/clone.2:197
#, no-wrap
-msgid "B<CLONE_FS>"
+msgid "B<CLONE_FS> (since Linux 2.0)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:211
+#: build/C/man2/clone.2:212
msgid ""
"If B<CLONE_FS> is set, the caller and the child process share the same file "
"system information. This includes the root of the file system, the current "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:223
+#: build/C/man2/clone.2:224
msgid ""
"If B<CLONE_FS> is not set, the child process works on a copy of the file "
"system information of the calling process at the time of the B<clone>() "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:223
+#: build/C/man2/clone.2:224
#, no-wrap
msgid "B<CLONE_IO> (since Linux 2.6.25)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:232
+#: build/C/man2/clone.2:233
msgid ""
"If B<CLONE_IO> is set, then the new process shares an I/O context with the "
"calling process. If this flag is not set, then (as with B<fork>(2)) the "
#. the anticipatory and CFQ scheduler
#. with CFQ and AS.
#. type: Plain text
-#: build/C/man2/clone.2:249
+#: build/C/man2/clone.2:250
msgid ""
"The I/O context is the I/O scope of the disk scheduler (i.e, what the I/O "
"scheduler uses to model scheduling of a process's I/O). If processes share "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:253
+#: build/C/man2/clone.2:254
msgid ""
"If the kernel is not configured with the B<CONFIG_BLOCK> option, this flag "
"is a no-op."
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:253 build/C/man2/unshare.2:74
+#: build/C/man2/clone.2:254 build/C/man2/unshare.2:78
#, no-wrap
msgid "B<CLONE_NEWIPC> (since Linux 2.6.19)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:263
+#: build/C/man2/clone.2:264
msgid ""
"If B<CLONE_NEWIPC> is set, then create the process in a new IPC namespace. "
"If this flag is not set, then (as with B<fork>(2)), the process is created "
"the implementation of containers."
msgstr ""
+#. commit 7eafd7c74c3f2e67c27621b987b28397110d643f
+#. https://lwn.net/Articles/312232/
#. type: Plain text
-#: build/C/man2/clone.2:274
+#: build/C/man2/clone.2:276
msgid ""
-"An IPC namespace consists of the set of identifiers for System V IPC "
-"objects. (These objects are created using B<msgctl>(2), B<semctl>(2), and "
-"B<shmctl>(2)). Objects created in an IPC namespace are visible to all other "
-"processes that are members of that namespace, but are not visible to "
-"processes in other IPC namespaces."
+"An IPC namespace provides an isolated view of System V IPC objects (see "
+"B<svipc>(7)) and (since Linux 2.6.30) POSIX message queues (see "
+"B<mq_overview>(7)). The common characteristic of these IPC mechanisms is "
+"that IPC objects are identified by mechanisms other than filesystem "
+"pathnames."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:278
+#: build/C/man2/clone.2:280
msgid ""
-"When an IPC namespace is destroyed (i.e, when the last process that is a "
+"Objects created in an IPC namespace are visible to all other processes that "
+"are members of that namespace, but are not visible to processes in other IPC "
+"namespaces."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:284
+msgid ""
+"When an IPC namespace is destroyed (i.e., when the last process that is a "
"member of the namespace terminates), all IPC objects in the namespace are "
"automatically destroyed."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:287
+#: build/C/man2/clone.2:293
msgid ""
"Use of this flag requires: a kernel configured with the B<CONFIG_SYSVIPC> "
"and B<CONFIG_IPC_NS> options and that the process be privileged "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:287 build/C/man2/unshare.2:91
+#: build/C/man2/clone.2:293 build/C/man2/unshare.2:95
#, no-wrap
msgid "B<CLONE_NEWNET> (since Linux 2.6.24)"
msgstr ""
#. FIXME Check when the implementation was completed
#. type: Plain text
-#: build/C/man2/clone.2:292
+#: build/C/man2/clone.2:298
msgid ""
"(The implementation of this flag was only completed by about kernel version "
"2.6.29.)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:301
+#: build/C/man2/clone.2:307
msgid ""
"If B<CLONE_NEWNET> is set, then create the process in a new network "
"namespace. If this flag is not set, then (as with B<fork>(2)), the process "
"is intended for the implementation of containers."
msgstr ""
+#. FIXME Add pointer to veth(4) page when it is eventually completed
#. type: Plain text
-#: build/C/man2/clone.2:315
+#: build/C/man2/clone.2:322
msgid ""
"A network namespace provides an isolated view of the networking stack "
"(network device interfaces, IPv4 and IPv6 protocol stacks, IP routing "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:320
+#: build/C/man2/clone.2:327
msgid ""
"When a network namespace is freed (i.e., when the last process in the "
"namespace terminates), its physical network devices are moved back to the "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:325
+#: build/C/man2/clone.2:332
msgid ""
"Use of this flag requires: a kernel configured with the B<CONFIG_NET_NS> "
"option and that the process be privileged (B<CAP_SYS_ADMIN>)."
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:325
+#: build/C/man2/clone.2:332
#, no-wrap
msgid "B<CLONE_NEWNS> (since Linux 2.4.19)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:328
+#: build/C/man2/clone.2:335
msgid "Start the child in a new mount namespace."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:349
+#: build/C/man2/clone.2:356
msgid ""
"Every process lives in a mount namespace. The I<namespace> of a process is "
"the data (the set of mounts) describing the file hierarchy as seen by that "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:356
+#: build/C/man2/clone.2:363
msgid ""
"After a B<clone>() where the B<CLONE_NEWNS> flag is set, the cloned child "
"is started in a new mount namespace, initialized with a copy of the "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:368
+#: build/C/man2/clone.2:375
msgid ""
"Only a privileged process (one having the B<CAP_SYS_ADMIN> capability) may "
"specify the B<CLONE_NEWNS> flag. It is not permitted to specify both "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:368
+#: build/C/man2/clone.2:375
#, no-wrap
msgid "B<CLONE_NEWPID> (since Linux 2.6.24)"
msgstr ""
#. The primary kernel commit is 30e49c263e36341b60b735cbef5ca37912549264
#. Author: Pavel Emelyanov <xemul@openvz.org>
#. type: Plain text
-#: build/C/man2/clone.2:385
+#: build/C/man2/clone.2:392
msgid ""
"If B<CLONE_NEWPID> is set, then create the process in a new PID namespace. "
"If this flag is not set, then (as with B<fork>(2)), the process is created "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:394
+#: build/C/man2/clone.2:401
msgid ""
"A PID namespace provides an isolated environment for PIDs: PIDs in a new "
"namespace start at 1, somewhat like a standalone system, and calls to "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:406
+#: build/C/man2/clone.2:413
msgid ""
"The first process created in a new namespace (i.e., the process created "
"using the B<CLONE_NEWPID> flag) has the PID 1, and is the \"init\" process "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:425
+#: build/C/man2/clone.2:432
msgid ""
"PID namespaces form a hierarchy. When a new PID namespace is created, the "
"processes in that namespace are visible in the PID namespace of the process "
#. mount -t proc proc /proc
#. type: Plain text
-#: build/C/man2/clone.2:441
+#: build/C/man2/clone.2:448
msgid ""
"After creating the new namespace, it is useful for the child to change its "
"root directory and mount a new procfs instance at I</proc> so that tools "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:448
+#: build/C/man2/clone.2:455
msgid ""
"Use of this flag requires: a kernel configured with the B<CONFIG_PID_NS> "
"option and that the process be privileged (B<CAP_SYS_ADMIN>). This flag "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:448 build/C/man2/unshare.2:140
+#: build/C/man2/clone.2:455 build/C/man2/unshare.2:131
#, no-wrap
msgid "B<CLONE_NEWUTS> (since Linux 2.6.19)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:460
+#: build/C/man2/clone.2:467
msgid ""
"If B<CLONE_NEWUTS> is set, then create the process in a new UTS namespace, "
"whose identifiers are initialized by duplicating the identifiers from the "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:472
+#: build/C/man2/clone.2:479
msgid ""
"A UTS namespace is the set of identifiers returned by B<uname>(2); among "
"these, the domain name and the host name can be modified by "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:477
+#: build/C/man2/clone.2:484
msgid ""
"Use of this flag requires: a kernel configured with the B<CONFIG_UTS_NS> "
"option and that the process be privileged (B<CAP_SYS_ADMIN>)."
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:477
+#: build/C/man2/clone.2:484
#, no-wrap
msgid "B<CLONE_PARENT> (since Linux 2.3.12)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:484
+#: build/C/man2/clone.2:491
msgid ""
"If B<CLONE_PARENT> is set, then the parent of the new child (as returned by "
"B<getppid>(2)) will be the same as that of the calling process."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:490
+#: build/C/man2/clone.2:497
msgid ""
"If B<CLONE_PARENT> is not set, then (as with B<fork>(2)) the child's parent "
"is the calling process."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:498
+#: build/C/man2/clone.2:505
msgid ""
"Note that it is the parent process, as returned by B<getppid>(2), which is "
"signaled when the child terminates, so that if B<CLONE_PARENT> is set, then "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:498
+#: build/C/man2/clone.2:505
#, no-wrap
msgid "B<CLONE_PARENT_SETTID> (since Linux 2.5.49)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:506
+#: build/C/man2/clone.2:513
msgid ""
"Store child thread ID at location I<ptid> in parent and child memory. (In "
"Linux 2.5.32-2.5.48 there was a flag B<CLONE_SETTID> that did this.)"
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:506
+#: build/C/man2/clone.2:513
#, no-wrap
msgid "B<CLONE_PID> (obsolete)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:517
+#: build/C/man2/clone.2:524
msgid ""
"If B<CLONE_PID> is set, the child process is created with the same process "
"ID as the calling process. This is good for hacking the system, but "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:517
+#: build/C/man2/clone.2:524
#, no-wrap
-msgid "B<CLONE_PTRACE>"
+msgid "B<CLONE_PTRACE> (since Linux 2.2)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:524
+#: build/C/man2/clone.2:531
msgid ""
"If B<CLONE_PTRACE> is specified, and the calling process is being traced, "
"then trace the child also (see B<ptrace>(2))."
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:524
+#: build/C/man2/clone.2:531
#, no-wrap
msgid "B<CLONE_SETTLS> (since Linux 2.5.32)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:531
+#: build/C/man2/clone.2:538
msgid ""
"The I<newtls> argument is the new TLS (Thread Local Storage) descriptor. "
"(See B<set_thread_area>(2).)"
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:531
+#: build/C/man2/clone.2:538
#, no-wrap
-msgid "B<CLONE_SIGHAND>"
+msgid "B<CLONE_SIGHAND> (since Linux 2.0)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:547
+#: build/C/man2/clone.2:554
msgid ""
"If B<CLONE_SIGHAND> is set, the calling process and the child process share "
"the same table of signal handlers. If the calling process or child process "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:558
+#: build/C/man2/clone.2:565
msgid ""
"If B<CLONE_SIGHAND> is not set, the child process inherits a copy of the "
"signal handlers of the calling process at the time B<clone>() is called. "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:566
+#: build/C/man2/clone.2:573
msgid ""
"Since Linux 2.6.0-test6, I<flags> must also include B<CLONE_VM> if "
"B<CLONE_SIGHAND> is specified"
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:566
+#: build/C/man2/clone.2:573
#, no-wrap
msgid "B<CLONE_STOPPED> (since Linux 2.6.0-test2)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:575
+#: build/C/man2/clone.2:582
msgid ""
"If B<CLONE_STOPPED> is set, then the child is initially stopped (as though "
"it was sent a B<SIGSTOP> signal), and must be resumed by sending it a "
#. glibc 2.8 removed this defn from bits/sched.h
#. type: Plain text
-#: build/C/man2/clone.2:583
+#: build/C/man2/clone.2:590
msgid ""
"This flag was I<deprecated> from Linux 2.6.25 onward, and was I<removed> "
"altogether in Linux 2.6.38."
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:583
+#: build/C/man2/clone.2:590
#, no-wrap
msgid "B<CLONE_SYSVSEM> (since Linux 2.5.10)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:592
+#: build/C/man2/clone.2:599
msgid ""
"If B<CLONE_SYSVSEM> is set, then the child and the calling process share a "
"single list of System V semaphore undo values (see B<semop>(2)). If this "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:592
+#: build/C/man2/clone.2:599
#, no-wrap
msgid "B<CLONE_THREAD> (since Linux 2.4.0-test8)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:601
+#: build/C/man2/clone.2:608
msgid ""
"If B<CLONE_THREAD> is set, the child is placed in the same thread group as "
"the calling process. To make the remainder of the discussion of "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:609
+#: build/C/man2/clone.2:616
msgid ""
"Thread groups were a feature added in Linux 2.4 to support the POSIX threads "
"notion of a set of threads that share a single PID. Internally, this shared "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:618
+#: build/C/man2/clone.2:625
msgid ""
"The threads within a group can be distinguished by their (system-wide) "
"unique thread IDs (TID). A new thread's TID is available as the function "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:628
+#: build/C/man2/clone.2:635
msgid ""
"When a call is made to B<clone>() without specifying B<CLONE_THREAD>, then "
"the resulting thread is placed in a new thread group whose TGID is the same "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:650
+#: build/C/man2/clone.2:657
msgid ""
"A new thread created with B<CLONE_THREAD> has the same parent process as the "
"caller of B<clone>() (i.e., like B<CLONE_PARENT>), so that calls to "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:655
+#: build/C/man2/clone.2:662
msgid ""
"After all of the threads in a thread group terminate the parent process of "
"the thread group is sent a B<SIGCHLD> (or other termination) signal."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:660
+#: build/C/man2/clone.2:667
msgid ""
"If any of the threads in a thread group performs an B<execve>(2), then all "
"threads other than the thread group leader are terminated, and the new "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:666
+#: build/C/man2/clone.2:673
msgid ""
"If one of the threads in a thread group creates a child using B<fork>(2), "
"then any thread in the group can B<wait>(2) for that child."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:674
+#: build/C/man2/clone.2:681
msgid ""
"Since Linux 2.5.35, I<flags> must also include B<CLONE_SIGHAND> if "
"B<CLONE_THREAD> is specified."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:679
+#: build/C/man2/clone.2:686
msgid ""
"Signals may be sent to a thread group as a whole (i.e., a TGID) using "
"B<kill>(2), or to a specific thread (i.e., TID) using B<tgkill>(2)."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:684
+#: build/C/man2/clone.2:691
msgid ""
"Signal dispositions and actions are process-wide: if an unhandled signal is "
"delivered to a thread, then it will affect (terminate, stop, continue, be "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:697
+#: build/C/man2/clone.2:704
msgid ""
"Each thread has its own signal mask, as set by B<sigprocmask>(2), but "
"signals can be pending either: for the whole process (i.e., deliverable to "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:709
+#: build/C/man2/clone.2:716
msgid ""
"If B<kill>(2) is used to send a signal to a thread group, and the thread "
"group has installed a handler for the signal, then the handler will be "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:709
+#: build/C/man2/clone.2:716
#, no-wrap
msgid "B<CLONE_UNTRACED> (since Linux 2.5.46)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:716
+#: build/C/man2/clone.2:723
msgid ""
"If B<CLONE_UNTRACED> is specified, then a tracing process cannot force "
"B<CLONE_PTRACE> on this child process."
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:716
+#: build/C/man2/clone.2:723
#, no-wrap
-msgid "B<CLONE_VFORK>"
+msgid "B<CLONE_VFORK> (since Linux 2.2)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:728
+#: build/C/man2/clone.2:735
msgid ""
"If B<CLONE_VFORK> is set, the execution of the calling process is suspended "
"until the child releases its virtual memory resources via a call to "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:734
+#: build/C/man2/clone.2:741
msgid ""
"If B<CLONE_VFORK> is not set then both the calling process and the child are "
"schedulable after the call, and an application should not rely on execution "
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:734
+#: build/C/man2/clone.2:741
#, no-wrap
-msgid "B<CLONE_VM>"
+msgid "B<CLONE_VM> (since Linux 2.0)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:747
+#: build/C/man2/clone.2:754
msgid ""
"If B<CLONE_VM> is set, the calling process and the child process run in the "
"same memory space. In particular, memory writes performed by the calling "
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:756
+#: build/C/man2/clone.2:763
msgid ""
"If B<CLONE_VM> is not set, the child process runs in a separate copy of the "
"memory space of the calling process at the time of B<clone>(). Memory "
msgstr ""
#. type: SS
-#: build/C/man2/clone.2:756
+#: build/C/man2/clone.2:763
#, no-wrap
msgid "sys_clone"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:773
+#: build/C/man2/clone.2:779
msgid ""
"The B<sys_clone> system call corresponds more closely to B<fork>(2) in that "
-"execution in the child continues from the point of the call. Thus, "
-"B<sys_clone> only requires the I<flags> and I<child_stack> arguments, which "
-"have the same meaning as for B<clone>(). (Note that the order of these "
-"arguments differs from B<clone>().)"
+"execution in the child continues from the point of the call. As such, the "
+"I<fn> and I<arg> arguments of the B<clone>() wrapper function are omitted. "
+"Furthermore, the argument order changes. The raw system call interface is "
+"roughly:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:785
+#, no-wrap
+msgid ""
+"B<long clone(unsigned long >I<flags>B<, void *>I<child_stack>B<,>\n"
+"B< void *>I<ptid>B<, void *>I<ctid>B<,>\n"
+"B< struct pt_regs *>I<regs>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:784
+#: build/C/man2/clone.2:798
msgid ""
"Another difference for B<sys_clone> is that the I<child_stack> argument may "
"be zero, in which case copy-on-write semantics ensure that the child gets "
"specified."
msgstr ""
+#. type: SS
+#: build/C/man2/clone.2:798
+#, no-wrap
+msgid "Linux 2.4 and earlier"
+msgstr ""
+
#. type: Plain text
-#: build/C/man2/clone.2:792
+#: build/C/man2/clone.2:806
msgid ""
"In Linux 2.4 and earlier, B<clone>() does not take arguments I<ptid>, "
"I<tls>, and I<ctid>."
#. gettid(2) returns current->pid;
#. getpid(2) returns current->tgid;
#. type: Plain text
-#: build/C/man2/clone.2:801
+#: build/C/man2/clone.2:815
msgid ""
"On success, the thread ID of the child process is returned in the caller's "
"thread of execution. On failure, -1 is returned in the caller's context, no "
msgstr ""
#. type: SH
-#: build/C/man2/clone.2:801 build/C/man2/sched_get_priority_max.2:97 build/C/man3/sched_getcpu.3:45 build/C/man2/sched_rr_get_interval.2:81 build/C/man2/sched_setaffinity.2:117 build/C/man2/sched_setparam.2:97 build/C/man2/sched_setscheduler.2:433 build/C/man2/sched_yield.2:49 build/C/man2/setns.2:73 build/C/man2/unshare.2:188
+#: build/C/man2/clone.2:815 build/C/man2/kcmp.2:167 build/C/man2/sched_get_priority_max.2:96 build/C/man3/sched_getcpu.3:47 build/C/man2/sched_rr_get_interval.2:80 build/C/man2/sched_setaffinity.2:116 build/C/man2/sched_setparam.2:96 build/C/man2/sched_setscheduler.2:432 build/C/man2/sched_yield.2:48 build/C/man2/setns.2:77 build/C/man2/unshare.2:194
#, no-wrap
msgid "ERRORS"
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:802
+#: build/C/man2/clone.2:816
#, no-wrap
msgid "B<EAGAIN>"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:805
+#: build/C/man2/clone.2:819
msgid "Too many processes are already running."
msgstr ""
#. type: TP
-#: build/C/man2/clone.2:805 build/C/man2/clone.2:812 build/C/man2/clone.2:827 build/C/man2/clone.2:835 build/C/man2/clone.2:843 build/C/man2/clone.2:851 build/C/man2/clone.2:857 build/C/man2/clone.2:867 build/C/man2/clone.2:875 build/C/man2/clone.2:883 build/C/man2/sched_get_priority_max.2:98 build/C/man2/sched_rr_get_interval.2:85 build/C/man2/sched_setaffinity.2:121 build/C/man2/sched_setaffinity.2:129 build/C/man2/sched_setparam.2:98 build/C/man2/sched_setscheduler.2:434 build/C/man2/setns.2:78 build/C/man2/unshare.2:189
+#: build/C/man2/clone.2:819 build/C/man2/clone.2:826 build/C/man2/clone.2:841 build/C/man2/clone.2:849 build/C/man2/clone.2:857 build/C/man2/clone.2:865 build/C/man2/clone.2:871 build/C/man2/clone.2:881 build/C/man2/clone.2:889 build/C/man2/clone.2:897 build/C/man2/kcmp.2:178 build/C/man2/sched_get_priority_max.2:97 build/C/man2/sched_rr_get_interval.2:84 build/C/man2/sched_setaffinity.2:120 build/C/man2/sched_setaffinity.2:128 build/C/man2/sched_setparam.2:97 build/C/man2/sched_setscheduler.2:433 build/C/man2/setns.2:82 build/C/man2/unshare.2:195
#, no-wrap
msgid "B<EINVAL>"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:812
+#: build/C/man2/clone.2:826
msgid ""
"B<CLONE_SIGHAND> was specified, but B<CLONE_VM> was not. (Since Linux "
"2.6.0-test6.)"
#. was specified.
#. (Since Linux 2.6.0-test6.)
#. type: Plain text
-#: build/C/man2/clone.2:827
+#: build/C/man2/clone.2:841
msgid ""
"B<CLONE_THREAD> was specified, but B<CLONE_SIGHAND> was not. (Since Linux "
"2.5.35.)"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:835
+#: build/C/man2/clone.2:849
msgid "Both B<CLONE_FS> and B<CLONE_NEWNS> were specified in I<flags>."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:843
+#: build/C/man2/clone.2:857
msgid "Both B<CLONE_NEWIPC> and B<CLONE_SYSVSEM> were specified in I<flags>."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:851
+#: build/C/man2/clone.2:865
msgid "Both B<CLONE_NEWPID> and B<CLONE_THREAD> were specified in I<flags>."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:857
+#: build/C/man2/clone.2:871
msgid "Returned by B<clone>() when a zero value is specified for I<child_stack>."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:867
+#: build/C/man2/clone.2:881
+msgid ""
+"B<CLONE_NEWIPC> was specified in I<flags>, but the kernel was not configured "
+"with the B<CONFIG_SYSVIPC> and B<CONFIG_IPC_NS> options."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:889
+msgid ""
+"B<CLONE_NEWNET> was specified in I<flags>, but the kernel was not configured "
+"with the B<CONFIG_NET_NS> option."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:897
+msgid ""
+"B<CLONE_NEWPID> was specified in I<flags>, but the kernel was not configured "
+"with the B<CONFIG_PID_NS> option."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:905
+msgid ""
+"B<CLONE_NEWUTS> was specified in I<flags>, but the kernel was not configured "
+"with the B<CONFIG_UTS> option."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/clone.2:905 build/C/man2/setns.2:89 build/C/man2/unshare.2:199
+#, no-wrap
+msgid "B<ENOMEM>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:910
+msgid ""
+"Cannot allocate sufficient memory to allocate a task structure for the "
+"child, or to copy those parts of the caller's context that need to be "
+"copied."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/clone.2:910 build/C/man2/clone.2:919 build/C/man2/kcmp.2:182 build/C/man2/sched_setaffinity.2:135 build/C/man2/sched_setparam.2:101 build/C/man2/sched_setscheduler.2:438 build/C/man2/setns.2:92 build/C/man2/unshare.2:203
+#, no-wrap
+msgid "B<EPERM>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:919
+msgid ""
+"B<CLONE_NEWIPC>, B<CLONE_NEWNET>, B<CLONE_NEWNS>, B<CLONE_NEWPID>, or "
+"B<CLONE_NEWUTS> was specified by an unprivileged process (process without "
+"B<CAP_SYS_ADMIN>)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:923
+msgid "B<CLONE_PID> was specified by a process other than process 0."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:930
+msgid ""
+"There is no entry for B<clone>() in libc5. glibc2 provides B<clone>() as "
+"described in this manual page."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:937
+msgid ""
+"The B<clone>() and B<sys_clone> calls are Linux-specific and should not be "
+"used in programs intended to be portable."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:947
+msgid ""
+"In the kernel 2.4.x series, B<CLONE_THREAD> generally does not make the "
+"parent of the new thread the same as the parent of the calling process. "
+"However, for kernel versions 2.4.7 to 2.4.18 the B<CLONE_THREAD> flag "
+"implied the B<CLONE_PARENT> flag (as in kernel 2.6)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:957
+msgid ""
+"For a while there was B<CLONE_DETACHED> (introduced in 2.5.32): parent wants "
+"no child-exit signal. In 2.6.2 the need to give this together with "
+"B<CLONE_THREAD> disappeared. This flag is still defined, but has no effect."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:962
+msgid ""
+"On i386, B<clone>() should not be called through vsyscall, but directly "
+"through I<int $0x80>."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:964
+msgid "On ia64, a different system call is used:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:971
+#, no-wrap
+msgid ""
+"B<int __clone2(int (*>I<fn>B<)(void *), >\n"
+"B< void *>I<child_stack_base>B<, size_t >I<stack_size>B<,>\n"
+"B< int >I<flags>B<, void *>I<arg>B<, ... >\n"
+"B< /* pid_t *>I<ptid>B<, struct user_desc *>I<tls>B<, pid_t "
+"*>I<ctid>B< */ );>\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:984
+msgid ""
+"The B<__clone2>() system call operates in the same way as B<clone>(), "
+"except that I<child_stack_base> points to the lowest address of the child's "
+"stack area, and I<stack_size> specifies the size of the stack pointed to by "
+"I<child_stack_base>."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1015
+msgid ""
+"Versions of the GNU C library that include the NPTL threading library "
+"contain a wrapper function for B<getpid>(2) that performs caching of PIDs. "
+"This caching relies on support in the glibc wrapper for B<clone>(), but as "
+"currently implemented, the cache may not be up to date in some "
+"circumstances. In particular, if a signal is delivered to the child "
+"immediately after the B<clone>() call, then a call to B<getpid>(2) in a "
+"handler for the signal may return the PID of the calling process (\"the "
+"parent\"), if the clone wrapper has not yet had a chance to update the PID "
+"cache in the child. (This discussion ignores the case where the child was "
+"created using B<CLONE_THREAD>, when B<getpid>(2) I<should> return the same "
+"value in the child and in the process that called B<clone>(), since the "
+"caller and the child are in the same thread group. The stale-cache problem "
+"also does not occur if the I<flags> argument includes B<CLONE_VM>.) To get "
+"the truth, it may be necessary to use code such as the following:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1018
+#, no-wrap
+msgid " #include E<lt>syscall.hE<gt>\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1020
+#, no-wrap
+msgid " pid_t mypid;\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1022
+#, no-wrap
+msgid " mypid = syscall(SYS_getpid);\n"
+msgstr ""
+
+#. type: SS
+#: build/C/man2/clone.2:1027
+#, no-wrap
+msgid "Create a child that executes in a separate UTS namespace"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1037
+msgid ""
+"The following program demonstrates the use of B<clone>() to create a child "
+"process that executes in a separate UTS namespace. The child changes the "
+"hostname in its UTS namespace. Both parent and child then display the "
+"system hostname, making it possible to see that the hostname differs in the "
+"UTS namespaces of the parent and child. For an example of the use of this "
+"program, see B<setns>(2)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1047
+#, no-wrap
+msgid ""
+"#define _GNU_SOURCE\n"
+"#include E<lt>sys/wait.hE<gt>\n"
+"#include E<lt>sys/utsname.hE<gt>\n"
+"#include E<lt>sched.hE<gt>\n"
+"#include E<lt>string.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1050 build/C/man2/setns.2:177
+#, no-wrap
+msgid ""
+"#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\e\n"
+" } while (0)\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1055
+#, no-wrap
+msgid ""
+"static int /* Start function for cloned child */\n"
+"childFunc(void *arg)\n"
+"{\n"
+" struct utsname uts;\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1057
+#, no-wrap
+msgid " /* Change hostname in UTS namespace of child */\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1060
+#, no-wrap
+msgid ""
+" if (sethostname(arg, strlen(arg)) == -1)\n"
+" errExit(\"sethostname\");\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1062
+#, no-wrap
+msgid " /* Retrieve and display hostname */\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1066
+#, no-wrap
+msgid ""
+" if (uname(&uts) == -1)\n"
+" errExit(\"uname\");\n"
+" printf(\"uts.nodename in child: %s\\en\", uts.nodename);\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1070
+#, no-wrap
+msgid ""
+" /* Keep the namespace open for a while, by sleeping.\n"
+" This allows some experimentation--for example, another\n"
+" process might join the namespace. */\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1072
+#, no-wrap
+msgid " sleep(200);\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1075
+#, no-wrap
+msgid ""
+" return 0; /* Child terminates now */\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1077
+#, no-wrap
+msgid "#define STACK_SIZE (1024 * 1024) /* Stack size for cloned child */\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1085
+#, no-wrap
+msgid ""
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" char *stack; /* Start of stack buffer */\n"
+" char *stackTop; /* End of stack buffer */\n"
+" pid_t pid;\n"
+" struct utsname uts;\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1090
+#, no-wrap
+msgid ""
+" if (argc E<lt> 2) {\n"
+" fprintf(stderr, \"Usage: %s E<lt>child-hostnameE<gt>\\en\", "
+"argv[0]);\n"
+" exit(EXIT_SUCCESS);\n"
+" }\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1092
+#, no-wrap
+msgid " /* Allocate stack for child */\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1097
+#, no-wrap
+msgid ""
+" stack = malloc(STACK_SIZE);\n"
+" if (stack == NULL)\n"
+" errExit(\"malloc\");\n"
+" stackTop = stack + STACK_SIZE; /* Assume stack grows downward */\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1100
+#, no-wrap
+msgid ""
+" /* Create child that has its own UTS namespace;\n"
+" child commences execution in childFunc() */\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1105
+#, no-wrap
+msgid ""
+" pid = clone(childFunc, stackTop, CLONE_NEWUTS | SIGCHLD, argv[1]);\n"
+" if (pid == -1)\n"
+" errExit(\"clone\");\n"
+" printf(\"clone() returned %ld\\en\", (long) pid);\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1107
+#, no-wrap
+msgid " /* Parent falls through to here */\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1109
+#, no-wrap
+msgid " sleep(1); /* Give child time to change its hostname */\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1112
+#, no-wrap
+msgid ""
+" /* Display hostname in parent\\(aqs UTS namespace. This will be\n"
+" different from hostname in child\\(aqs UTS namespace. */\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1116
+#, no-wrap
+msgid ""
+" if (uname(&uts) == -1)\n"
+" errExit(\"uname\");\n"
+" printf(\"uts.nodename in parent: %s\\en\", uts.nodename);\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1120
+#, no-wrap
+msgid ""
+" if (waitpid(pid, NULL, 0) == -1) /* Wait for child */\n"
+" errExit(\"waitpid\");\n"
+" printf(\"child has terminated\\en\");\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1123
+#, no-wrap
+msgid ""
+" exit(EXIT_SUCCESS);\n"
+"}\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/clone.2:1138
+msgid ""
+"B<fork>(2), B<futex>(2), B<getpid>(2), B<gettid>(2), B<kcmp>(2), "
+"B<set_thread_area>(2), B<set_tid_address>(2), B<setns>(2), B<tkill>(2), "
+"B<unshare>(2), B<wait>(2), B<capabilities>(7), B<pthreads>(7)"
+msgstr ""
+
+#. type: TH
+#: build/C/man2/kcmp.2:28
+#, no-wrap
+msgid "KCMP"
+msgstr ""
+
+#. type: TH
+#: build/C/man2/kcmp.2:28
+#, no-wrap
+msgid "2013-01-27"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:31
+msgid "kcmp - compare two processes to determine if they share a kernel resource"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:34
+#, no-wrap
+msgid "B<#include E<lt>linux/kcmp.hE<gt>>\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:37
+#, no-wrap
+msgid ""
+"B<int kcmp(pid_t >I<pid1>B<, pid_t >I<pid2>B<, int >I<type>B<,>\n"
+"B< unsigned long >I<idx1>B<, unsigned long >I<idx2>B<);>\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:41
+msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:50
+msgid ""
+"The B<kcmp>() system call can be used to check whether the two processes "
+"identified by I<pid1> and I<pid2> share a kernel resource such as virtual "
+"memory, file descriptors, and so on."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:55
+msgid ""
+"The I<type> argument specifies which resource is to be compared in the two "
+"processes. It has one of the following values:"
+msgstr ""
+
+#. type: TP
+#: build/C/man2/kcmp.2:55
+#, no-wrap
+msgid "B<KCMP_FILE>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:67
+msgid ""
+"Check whether a file descriptor I<idx1> in the process I<pid1> refers to the "
+"same open file description (see B<open>(2)) as file descriptor I<idx2> in "
+"the process I<pid2>."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/kcmp.2:67
+#, no-wrap
+msgid "B<KCMP_FILES>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:75
+msgid ""
+"Check whether the process share the same set of open file descriptors. The "
+"arguments I<idx1> and I<idx2> are ignored."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/kcmp.2:75
+#, no-wrap
+msgid "B<KCMP_FS>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:84
+msgid ""
+"Check whether the processes share the same file system information (i.e., "
+"file mode creation mask, working directory, and file system root). The "
+"arguments I<idx1> and I<idx2> are ignored."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/kcmp.2:84
+#, no-wrap
+msgid "B<KCMP_IO>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:92
+msgid ""
+"Check whether the processes share I/O context. The arguments I<idx1> and "
+"I<idx2> are ignored."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/kcmp.2:92
+#, no-wrap
+msgid "B<KCMP_SIGHAND>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:100
+msgid ""
+"Check whether the processes share the same table of signal dispositions. "
+"The arguments I<idx1> and I<idx2> are ignored."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/kcmp.2:100
+#, no-wrap
+msgid "B<KCMP_SYSVSEM>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:109
+msgid ""
+"Check whether the processes share the same list of System V semaphore undo "
+"operations. The arguments I<idx1> and I<idx2> are ignored."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/kcmp.2:109
+#, no-wrap
+msgid "B<KCMP_VM>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:117
+msgid ""
+"Check whether the processes share the same address space. The arguments "
+"I<idx1> and I<idx2> are ignored."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/kcmp.2:124
msgid ""
-"B<CLONE_NEWIPC> was specified in I<flags>, but the kernel was not configured "
-"with the B<CONFIG_SYSVIPC> and B<CONFIG_IPC_NS> options."
+"Note the B<kcmp>() is not protected against false positives which may have "
+"place if tasks are running. Which means one should stop tasks being "
+"inspected with this syscall to obtain meaningful results."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:875
+#: build/C/man2/kcmp.2:130
msgid ""
-"B<CLONE_NEWNET> was specified in I<flags>, but the kernel was not configured "
-"with the B<CONFIG_NET_NS> option."
+"The return value of a successful call to B<kcmp>() is simply the result of "
+"arithmetic comparison of kernel pointers (when the kernel compares "
+"resources, it uses their memory addresses)."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:883
+#: build/C/man2/kcmp.2:138
msgid ""
-"B<CLONE_NEWPID> was specified in I<flags>, but the kernel was not configured "
-"with the B<CONFIG_PID_NS> option."
+"The easiest way to explain is to consider an example. Suppose that I<v1> "
+"and I<v2> are the addresses of appropriate resources, then the return value "
+"is one of the following:"
+msgstr ""
+
+#. type: IP
+#: build/C/man2/kcmp.2:139
+#, no-wrap
+msgid "0"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:891
+#: build/C/man2/kcmp.2:144
msgid ""
-"B<CLONE_NEWUTS> was specified in I<flags>, but the kernel was not configured "
-"with the B<CONFIG_UTS> option."
+"I<v1> is equal to I<v2>; in other words, the two processes share the "
+"resource."
msgstr ""
-#. type: TP
-#: build/C/man2/clone.2:891 build/C/man2/setns.2:85 build/C/man2/unshare.2:193
+#. type: IP
+#: build/C/man2/kcmp.2:144
#, no-wrap
-msgid "B<ENOMEM>"
+msgid "1"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:896
-msgid ""
-"Cannot allocate sufficient memory to allocate a task structure for the "
-"child, or to copy those parts of the caller's context that need to be "
-"copied."
+#: build/C/man2/kcmp.2:148
+msgid "I<v1> is less than I<v2>."
msgstr ""
-#. type: TP
-#: build/C/man2/clone.2:896 build/C/man2/clone.2:905 build/C/man2/sched_setaffinity.2:136 build/C/man2/sched_setparam.2:102 build/C/man2/sched_setscheduler.2:439 build/C/man2/setns.2:88 build/C/man2/unshare.2:197
+#. type: IP
+#: build/C/man2/kcmp.2:148
#, no-wrap
-msgid "B<EPERM>"
+msgid "2"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:905
-msgid ""
-"B<CLONE_NEWIPC>, B<CLONE_NEWNET>, B<CLONE_NEWNS>, B<CLONE_NEWPID>, or "
-"B<CLONE_NEWUTS> was specified by an unprivileged process (process without "
-"B<CAP_SYS_ADMIN>)."
+#: build/C/man2/kcmp.2:152
+msgid "I<v1> is greater than I<v2>."
+msgstr ""
+
+#. type: IP
+#: build/C/man2/kcmp.2:152
+#, no-wrap
+msgid "3"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:909
-msgid "B<CLONE_PID> was specified by a process other than process 0."
+#: build/C/man2/kcmp.2:157
+msgid "I<v1> is not equal to I<v2>, but ordering information is unavailable."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:916
-msgid ""
-"There is no entry for B<clone>() in libc5. glibc2 provides B<clone>() as "
-"described in this manual page."
+#: build/C/man2/kcmp.2:162
+msgid "On error, -1 is returned, and I<errno> is set appropriately."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:923
+#: build/C/man2/kcmp.2:167
msgid ""
-"The B<clone>() and B<sys_clone> calls are Linux-specific and should not be "
-"used in programs intended to be portable."
+"B<kcmp ()> was designed to return values suitable for sorting. This is "
+"particularly handy if one needs to compare a large number of file "
+"descriptors."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/kcmp.2:168 build/C/man2/setns.2:78
+#, no-wrap
+msgid "B<EBADF>"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:933
-msgid ""
-"In the kernel 2.4.x series, B<CLONE_THREAD> generally does not make the "
-"parent of the new thread the same as the parent of the calling process. "
-"However, for kernel versions 2.4.7 to 2.4.18 the B<CLONE_THREAD> flag "
-"implied the B<CLONE_PARENT> flag (as in kernel 2.6)."
+#: build/C/man2/kcmp.2:178
+msgid "I<type> is B<KCMP_FILE> and I<fd1> or I<fd2> is not an open file descriptor."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:943
-msgid ""
-"For a while there was B<CLONE_DETACHED> (introduced in 2.5.32): parent wants "
-"no child-exit signal. In 2.6.2 the need to give this together with "
-"B<CLONE_THREAD> disappeared. This flag is still defined, but has no effect."
+#: build/C/man2/kcmp.2:182
+msgid "I<type> is invalid."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:948
+#: build/C/man2/kcmp.2:188
msgid ""
-"On i386, B<clone>() should not be called through vsyscall, but directly "
-"through I<int $0x80>."
+"Insufficient permission to inspect process resources. The B<CAP_SYS_PTRACE> "
+"capability is required to inspect processes that you do not own."
msgstr ""
-#. type: Plain text
-#: build/C/man2/clone.2:950
-msgid "On ia64, a different system call is used:"
+#. type: TP
+#: build/C/man2/kcmp.2:188 build/C/man2/sched_rr_get_interval.2:90 build/C/man2/sched_setaffinity.2:145 build/C/man2/sched_setparam.2:107 build/C/man2/sched_setscheduler.2:441
+#, no-wrap
+msgid "B<ESRCH>"
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:957
-#, no-wrap
-msgid ""
-"B<int __clone2(int (*>I<fn>B<)(void *), >\n"
-"B< void *>I<child_stack_base>B<, size_t >I<stack_size>B<,>\n"
-"B< int >I<flags>B<, void *>I<arg>B<, ... >\n"
-"B< /* pid_t *>I<ptid>B<, struct user_desc *>I<tls>B<, pid_t "
-"*>I<ctid>B< */ );>\n"
+#: build/C/man2/kcmp.2:195
+msgid "Process I<pid1> or I<pid2> does not exist."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:970
-msgid ""
-"The B<__clone2>() system call operates in the same way as B<clone>(), "
-"except that I<child_stack_base> points to the lowest address of the child's "
-"stack area, and I<stack_size> specifies the size of the stack pointed to by "
-"I<child_stack_base>."
+#: build/C/man2/kcmp.2:199
+msgid "The B<kcmp>() system call first appeared in Linux 3.5."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:1001
+#: build/C/man2/kcmp.2:202
msgid ""
-"Versions of the GNU C library that include the NPTL threading library "
-"contain a wrapper function for B<getpid>(2) that performs caching of PIDs. "
-"This caching relies on support in the glibc wrapper for B<clone>(), but as "
-"currently implemented, the cache may not be up to date in some "
-"circumstances. In particular, if a signal is delivered to the child "
-"immediately after the B<clone>() call, then a call to B<getpid>(2) in a "
-"handler for the signal may return the PID of the calling process (\"the "
-"parent\"), if the clone wrapper has not yet had a chance to update the PID "
-"cache in the child. (This discussion ignores the case where the child was "
-"created using B<CLONE_THREAD>, when B<getpid>(2) I<should> return the same "
-"value in the child and in the process that called B<clone>(), since the "
-"caller and the child are in the same thread group. The stale-cache problem "
-"also does not occur if the I<flags> argument includes B<CLONE_VM>.) To get "
-"the truth, it may be necessary to use code such as the following:"
+"B<kcmp>() is Linux specific and should not be used in programs intended to "
+"be portable."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:1004
-#, no-wrap
-msgid " #include E<lt>syscall.hE<gt>\n"
+#: build/C/man2/kcmp.2:205
+msgid ""
+"Glibc does not provide a wrapper for this system call; call it using "
+"B<syscall>(2)."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:1006
-#, no-wrap
-msgid " pid_t mypid;\n"
+#: build/C/man2/kcmp.2:214
+msgid ""
+"This system call is available only if the kernel was configured with "
+"B<CONFIG_CHECKPOINT_RESTORE>. The main use of the system call is for the "
+"checkpoint/restore in user space (CRIU) feature. The alternative to this "
+"system call would have been to expose suitable process information via the "
+"B<proc>(5) file system; this was deemed to be unsuitable for security "
+"reasons."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:1008
-#, no-wrap
-msgid " mypid = syscall(SYS_getpid);\n"
+#: build/C/man2/kcmp.2:219
+msgid ""
+"See B<clone>(2) for some background information on the shared resources "
+"referred to on this page."
msgstr ""
#. type: Plain text
-#: build/C/man2/clone.2:1024
-msgid ""
-"B<fork>(2), B<futex>(2), B<getpid>(2), B<gettid>(2), B<set_thread_area>(2), "
-"B<set_tid_address>(2), B<tkill>(2), B<unshare>(2), B<wait>(2), "
-"B<capabilities>(7), B<pthreads>(7)"
+#: build/C/man2/kcmp.2:222
+msgid "B<clone>(2), B<unshare>(2)"
msgstr ""
#. type: TH
-#: build/C/man2/sched_get_priority_max.2:30
+#: build/C/man2/sched_get_priority_max.2:29
#, no-wrap
msgid "SCHED_GET_PRIORITY_MAX"
msgstr ""
#. type: TH
-#: build/C/man2/sched_get_priority_max.2:30 build/C/man2/sched_setparam.2:31
+#: build/C/man2/sched_get_priority_max.2:29
#, no-wrap
msgid "2006-03-23"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:33
+#: build/C/man2/sched_get_priority_max.2:32
msgid "sched_get_priority_max, sched_get_priority_min - get static priority range"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:35 build/C/man2/sched_rr_get_interval.2:35 build/C/man2/sched_yield.2:35
+#: build/C/man2/sched_get_priority_max.2:34 build/C/man2/sched_rr_get_interval.2:34 build/C/man2/sched_yield.2:34
msgid "B<#include E<lt>sched.hE<gt>>"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:37
+#: build/C/man2/sched_get_priority_max.2:36
msgid "B<int sched_get_priority_max(int >I<policy>B<);>"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:39
+#: build/C/man2/sched_get_priority_max.2:38
msgid "B<int sched_get_priority_min(int >I<policy>B<);>"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:55
+#: build/C/man2/sched_get_priority_max.2:54
msgid ""
"B<sched_get_priority_max>() returns the maximum priority value that can be "
"used with the scheduling algorithm identified by I<policy>. "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:64
+#: build/C/man2/sched_get_priority_max.2:63
msgid ""
"Processes with numerically higher priority values are scheduled before "
"processes with numerically lower priority values. Thus, the value returned "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:70
+#: build/C/man2/sched_get_priority_max.2:69
msgid ""
"Linux allows the static priority value range 1 to 99 for B<SCHED_FIFO> and "
"B<SCHED_RR> and the priority 0 for B<SCHED_OTHER> and B<SCHED_BATCH>. "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:79
+#: build/C/man2/sched_get_priority_max.2:78
msgid ""
"The range of scheduling priorities may vary on other POSIX systems, thus it "
"is a good idea for portable applications to use a virtual priority range and "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:87
+#: build/C/man2/sched_get_priority_max.2:86
msgid ""
"POSIX systems on which B<sched_get_priority_max>() and "
"B<sched_get_priority_min>() are available define "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:97
+#: build/C/man2/sched_get_priority_max.2:96
msgid ""
"On success, B<sched_get_priority_max>() and B<sched_get_priority_min>() "
"return the maximum/minimum priority value for the named scheduling policy. "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:101
+#: build/C/man2/sched_get_priority_max.2:100
msgid "The argument I<policy> does not identify a defined scheduling policy."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:103 build/C/man2/sched_rr_get_interval.2:97 build/C/man2/sched_setparam.2:113 build/C/man2/sched_yield.2:55
+#: build/C/man2/sched_get_priority_max.2:102 build/C/man2/sched_rr_get_interval.2:96 build/C/man2/sched_setparam.2:112 build/C/man2/sched_yield.2:54
msgid "POSIX.1-2001."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:110
+#: build/C/man2/sched_get_priority_max.2:111
msgid ""
"B<sched_getaffinity>(2), B<sched_getparam>(2), B<sched_getscheduler>(2), "
"B<sched_setaffinity>(2), B<sched_setparam>(2), B<sched_setscheduler>(2)"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_get_priority_max.2:113 build/C/man2/sched_rr_get_interval.2:132 build/C/man2/sched_setparam.2:127 build/C/man2/sched_setscheduler.2:538 build/C/man2/sched_yield.2:85
+#: build/C/man2/sched_get_priority_max.2:114 build/C/man2/sched_rr_get_interval.2:131 build/C/man2/sched_setparam.2:134 build/C/man2/sched_setscheduler.2:563 build/C/man2/sched_yield.2:84
msgid ""
"I<Programming for the real world - POSIX.4> by Bill O. Gallmeister, O'Reilly "
-"& Associates, Inc., ISBN 1-56592-074-0"
+"& Associates, Inc., ISBN 1-56592-074-0."
msgstr ""
#. type: TH
-#: build/C/man3/sched_getcpu.3:24
+#: build/C/man3/sched_getcpu.3:26
#, no-wrap
msgid "SCHED_GETCPU"
msgstr ""
#. type: TH
-#: build/C/man3/sched_getcpu.3:24
+#: build/C/man3/sched_getcpu.3:26
#, no-wrap
msgid "2010-10-31"
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:27
+#: build/C/man3/sched_getcpu.3:29
msgid "sched_getcpu - determine CPU on which the calling thread is running"
msgstr ""
#. Really:_BSD_SOURCE || _SVID_SOURCE
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:32
+#: build/C/man3/sched_getcpu.3:34
#, no-wrap
msgid ""
"B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:34
+#: build/C/man3/sched_getcpu.3:36
#, no-wrap
msgid "B<int sched_getcpu(void);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:38
+#: build/C/man3/sched_getcpu.3:40
msgid ""
"B<sched_getcpu>() returns the number of the CPU on which the calling thread "
"is currently executing."
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:45
+#: build/C/man3/sched_getcpu.3:47
msgid ""
"On success, B<sched_getcpu>() returns a nonnegative CPU number. On error, "
"-1 is returned and I<errno> is set to indicate the error."
msgstr ""
#. type: TP
-#: build/C/man3/sched_getcpu.3:46 build/C/man2/sched_rr_get_interval.2:88
+#: build/C/man3/sched_getcpu.3:48 build/C/man2/sched_rr_get_interval.2:87
#, no-wrap
msgid "B<ENOSYS>"
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:50
+#: build/C/man3/sched_getcpu.3:52
msgid "This kernel does not implement B<getcpu>(2)."
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:52
+#: build/C/man3/sched_getcpu.3:54
msgid "This function is available since glibc 2.6."
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:55
+#: build/C/man3/sched_getcpu.3:57
msgid "B<sched_getcpu>() is glibc specific."
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:57
+#: build/C/man3/sched_getcpu.3:59
msgid "The call"
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:61
+#: build/C/man3/sched_getcpu.3:63
#, no-wrap
msgid "cpu = sched_getcpu();\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:67
+#: build/C/man3/sched_getcpu.3:69
msgid "is equivalent to the following B<getcpu>(2) call:"
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:73
+#: build/C/man3/sched_getcpu.3:75
#, no-wrap
msgid ""
"int c, s;\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/sched_getcpu.3:77
+#: build/C/man3/sched_getcpu.3:79
msgid "B<getcpu>(2)"
msgstr ""
#. type: TH
-#: build/C/man2/sched_rr_get_interval.2:30
+#: build/C/man2/sched_rr_get_interval.2:29
#, no-wrap
msgid "SCHED_RR_GET_INTERVAL"
msgstr ""
#. type: TH
-#: build/C/man2/sched_rr_get_interval.2:30
+#: build/C/man2/sched_rr_get_interval.2:29
#, no-wrap
msgid "2011-10-16"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:33
+#: build/C/man2/sched_rr_get_interval.2:32
msgid "sched_rr_get_interval - get the SCHED_RR interval for the named process"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:37
+#: build/C/man2/sched_rr_get_interval.2:36
msgid "B<int sched_rr_get_interval(pid_t >I<pid>B<, struct timespec * >I<tp>B<);>"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:48
+#: build/C/man2/sched_rr_get_interval.2:47
msgid ""
"B<sched_rr_get_interval>() writes into the I<timespec> structure pointed to "
"by I<tp> the round-robin time quantum for the process identified by I<pid>. "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:52
+#: build/C/man2/sched_rr_get_interval.2:51
msgid "The I<timespec> structure has the following form:"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:59
+#: build/C/man2/sched_rr_get_interval.2:58
#, no-wrap
msgid ""
"struct timespec {\n"
#. The round-robin time quantum value is not alterable under Linux
#. 1.3.81.
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:74
+#: build/C/man2/sched_rr_get_interval.2:73
msgid ""
"If I<pid> is zero, the time quantum for the calling process is written into "
"I<*tp>."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:81
+#: build/C/man2/sched_rr_get_interval.2:80
msgid ""
"On success, B<sched_rr_get_interval>() returns 0. On error, -1 is "
"returned, and I<errno> is set appropriately."
msgstr ""
#. type: TP
-#: build/C/man2/sched_rr_get_interval.2:82 build/C/man2/sched_setaffinity.2:118
+#: build/C/man2/sched_rr_get_interval.2:81 build/C/man2/sched_setaffinity.2:117
#, no-wrap
msgid "B<EFAULT>"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:85
-msgid "Problem with copying information to userspace."
+#: build/C/man2/sched_rr_get_interval.2:84
+msgid "Problem with copying information to user space."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:88
+#: build/C/man2/sched_rr_get_interval.2:87
msgid "Invalid pid."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:91
+#: build/C/man2/sched_rr_get_interval.2:90
msgid "The system call is not yet implemented (only on rather old kernels)."
msgstr ""
-#. type: TP
-#: build/C/man2/sched_rr_get_interval.2:91 build/C/man2/sched_setaffinity.2:146 build/C/man2/sched_setparam.2:108 build/C/man2/sched_setscheduler.2:442
-#, no-wrap
-msgid "B<ESRCH>"
-msgstr ""
-
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:95
+#: build/C/man2/sched_rr_get_interval.2:94
msgid "Could not find a process with the ID I<pid>."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:104
+#: build/C/man2/sched_rr_get_interval.2:103
msgid ""
"POSIX systems on which B<sched_rr_get_interval>() is available define "
"B<_POSIX_PRIORITY_SCHEDULING> in I<E<lt>unistd.hE<gt>>."
msgstr ""
#. type: SS
-#: build/C/man2/sched_rr_get_interval.2:104
+#: build/C/man2/sched_rr_get_interval.2:103
#, no-wrap
-msgid "Linux Notes"
+msgid "Linux notes"
msgstr ""
#. commit a4ec24b48ddef1e93f7578be53270f0b95ad666c
#. ENOSYS, because SCHED_RR has not yet been fully implemented and tested
#. properly.
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:126
+#: build/C/man2/sched_rr_get_interval.2:125
msgid ""
"POSIX does not specify any mechanism for controlling the size of the "
"round-robin time quantum. Older Linux kernels provide a (nonportable) "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_rr_get_interval.2:129 build/C/man2/sched_setaffinity.2:178
+#: build/C/man2/sched_rr_get_interval.2:128 build/C/man2/sched_setaffinity.2:177
msgid "B<sched_setscheduler>(2) has a description of the Linux scheduling scheme."
msgstr ""
#. type: TH
-#: build/C/man2/sched_setaffinity.2:35
+#: build/C/man2/sched_setaffinity.2:34
#, no-wrap
msgid "SCHED_SETAFFINITY"
msgstr ""
#. type: TH
-#: build/C/man2/sched_setaffinity.2:35
+#: build/C/man2/sched_setaffinity.2:34
#, no-wrap
-msgid "2010-11-06"
+msgid "2013-02-11"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:39
+#: build/C/man2/sched_setaffinity.2:38
msgid ""
"sched_setaffinity, sched_getaffinity - set and get a process's CPU affinity "
"mask"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:46
+#: build/C/man2/sched_setaffinity.2:45
#, no-wrap
msgid ""
"B<int sched_setaffinity(pid_t >I<pid>B<, size_t >I<cpusetsize>B<,>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:49
+#: build/C/man2/sched_setaffinity.2:48
#, no-wrap
msgid ""
"B<int sched_getaffinity(pid_t >I<pid>B<, size_t >I<cpusetsize>B<,>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:64
+#: build/C/man2/sched_setaffinity.2:63
msgid ""
"A process's CPU affinity mask determines the set of CPUs on which it is "
"eligible to run. On a multiprocessor system, setting the CPU affinity mask "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:71
+#: build/C/man2/sched_setaffinity.2:70
msgid ""
"A CPU affinity mask is represented by the I<cpu_set_t> structure, a \"CPU "
"set\", pointed to by I<mask>. A set of macros for manipulating CPU sets is "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:86
+#: build/C/man2/sched_setaffinity.2:85
msgid ""
"B<sched_setaffinity>() sets the CPU affinity mask of the process whose ID "
"is I<pid> to the value specified by I<mask>. If I<pid> is zero, then the "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:93
+#: build/C/man2/sched_setaffinity.2:92
msgid ""
"If the process specified by I<pid> is not currently running on one of the "
"CPUs specified in I<mask>, then that process is migrated to one of the CPUs "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:108
+#: build/C/man2/sched_setaffinity.2:107
msgid ""
"B<sched_getaffinity>() writes the affinity mask of the process whose ID is "
"I<pid> into the I<cpu_set_t> structure pointed to by I<mask>. The "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:117
+#: build/C/man2/sched_setaffinity.2:116
msgid ""
"On success, B<sched_setaffinity>() and B<sched_getaffinity>() return 0. "
"On error, -1 is returned, and I<errno> is set appropriately."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:121
+#: build/C/man2/sched_setaffinity.2:120
msgid "A supplied memory address was invalid."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:129
+#: build/C/man2/sched_setaffinity.2:128
msgid ""
"The affinity bit mask I<mask> contains no processors that are currently "
"physically on the system and permitted to the process according to any "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:136
+#: build/C/man2/sched_setaffinity.2:135
msgid ""
"(B<sched_getaffinity>() and, in kernels before 2.6.9, "
"B<sched_setaffinity>()) I<cpusetsize> is smaller than the size of the "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:146
+#: build/C/man2/sched_setaffinity.2:145
msgid ""
"(B<sched_setaffinity>()) The calling process does not have appropriate "
"privileges. The caller needs an effective user ID equal to the real user ID "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:149 build/C/man2/sched_setparam.2:111 build/C/man2/sched_setscheduler.2:445
+#: build/C/man2/sched_setaffinity.2:148 build/C/man2/sched_setparam.2:110 build/C/man2/sched_setscheduler.2:444
msgid "The process whose ID is I<pid> could not be found."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:160
+#: build/C/man2/sched_setaffinity.2:159
msgid ""
"The CPU affinity system calls were introduced in Linux kernel 2.5.8. The "
"system call wrappers were introduced in glibc 2.3. Initially, the glibc "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:162
+#: build/C/man2/sched_setaffinity.2:161
msgid "These system calls are Linux-specific."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:175
+#: build/C/man2/sched_setaffinity.2:174
msgid ""
"After a call to B<sched_setaffinity>(), the set of CPUs on which the process "
"will actually run is the intersection of the set specified in the I<mask> "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:195
+#: build/C/man2/sched_setaffinity.2:194
msgid ""
"The affinity mask is actually a per-thread attribute that can be adjusted "
"independently for each of the threads in a thread group. The value returned "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:201
+#: build/C/man2/sched_setaffinity.2:200
msgid ""
"A child created via B<fork>(2) inherits its parent's CPU affinity mask. "
"The affinity mask is preserved across an B<execve>(2)."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:215
+#: build/C/man2/sched_setaffinity.2:214
msgid ""
"This manual page describes the glibc interface for the CPU affinity calls. "
"The actual system call interface is slightly different, with the I<mask> "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setaffinity.2:231
+#: build/C/man2/sched_setaffinity.2:233
msgid ""
-"B<clone>(2), B<getcpu>(2), B<getpriority>(2), B<gettid>(2), B<nice>(2), "
-"B<sched_get_priority_max>(2), B<sched_get_priority_min>(2), "
+"B<taskset>(1), B<clone>(2), B<getcpu>(2), B<getpriority>(2), B<gettid>(2), "
+"B<nice>(2), B<sched_get_priority_max>(2), B<sched_get_priority_min>(2), "
"B<sched_getscheduler>(2), B<sched_setscheduler>(2), B<setpriority>(2), "
"B<CPU_SET>(3), B<pthread_setaffinity_np>(3), B<sched_getcpu>(3), "
"B<capabilities>(7), B<cpuset>(7)"
msgstr ""
#. type: TH
-#: build/C/man2/sched_setparam.2:31
+#: build/C/man2/sched_setparam.2:30
#, no-wrap
msgid "SCHED_SETPARAM"
msgstr ""
+#. type: TH
+#: build/C/man2/sched_setparam.2:30 build/C/man2/sched_setscheduler.2:46
+#, no-wrap
+msgid "2013-02-12"
+msgstr ""
+
#. type: Plain text
-#: build/C/man2/sched_setparam.2:34
+#: build/C/man2/sched_setparam.2:33
msgid "sched_setparam, sched_getparam - set and get scheduling parameters"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:37 build/C/man2/sched_setscheduler.2:54
+#: build/C/man2/sched_setparam.2:36 build/C/man2/sched_setscheduler.2:53
#, no-wrap
msgid "B<#include E<lt>sched.hE<gt>>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:39
+#: build/C/man2/sched_setparam.2:38
#, no-wrap
msgid ""
"B<int sched_setparam(pid_t >I<pid>B<, const struct sched_param "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:41
+#: build/C/man2/sched_setparam.2:40
#, no-wrap
msgid "B<int sched_getparam(pid_t >I<pid>B<, struct sched_param *>I<param>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:47 build/C/man2/sched_setscheduler.2:66
+#: build/C/man2/sched_setparam.2:46 build/C/man2/sched_setscheduler.2:65
#, no-wrap
msgid ""
"B<struct sched_param {\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:61
+#: build/C/man2/sched_setparam.2:60
msgid ""
"B<sched_setparam>() sets the scheduling parameters associated with the "
"scheduling policy for the process identified by I<pid>. If I<pid> is zero, "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:67
+#: build/C/man2/sched_setparam.2:66
msgid ""
"B<sched_getparam>() retrieves the scheduling parameters for the process "
"identified by I<pid>. If I<pid> is zero, then the parameters of the calling "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:76
+#: build/C/man2/sched_setparam.2:75
msgid ""
"B<sched_setparam>() checks the validity of I<param> for the scheduling "
"policy of the process. The value I<param-E<gt>sched_priority> must lie "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:80
+#: build/C/man2/sched_setparam.2:79
msgid ""
"For a discussion of the privileges and resource limits related to scheduling "
"priority and policy, see B<sched_setscheduler>(2)."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:88
+#: build/C/man2/sched_setparam.2:87
msgid ""
"POSIX systems on which B<sched_setparam>() and B<sched_getparam>() are "
"available define B<_POSIX_PRIORITY_SCHEDULING> in I<E<lt>unistd.hE<gt>>."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:97
+#: build/C/man2/sched_setparam.2:96
msgid ""
"On success, B<sched_setparam>() and B<sched_getparam>() return 0. On "
"error, -1 is returned, and I<errno> is set appropriately."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:102
+#: build/C/man2/sched_setparam.2:101
msgid "The argument I<param> does not make sense for the current scheduling policy."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:108
+#: build/C/man2/sched_setparam.2:107
msgid ""
"The calling process does not have appropriate privileges (Linux: does not "
"have the B<CAP_SYS_NICE> capability)."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setparam.2:124
+#: build/C/man2/sched_setparam.2:118
+msgid ""
+"Scheduling parameters are in fact per-thread attributes on Linux; see "
+"B<sched_setscheduler>(2)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/sched_setparam.2:131
msgid ""
"B<getpriority>(2), B<nice>(2), B<sched_get_priority_max>(2), "
"B<sched_get_priority_min>(2), B<sched_getaffinity>(2), "
msgstr ""
#. type: TH
-#: build/C/man2/sched_setscheduler.2:47
+#: build/C/man2/sched_setscheduler.2:46
#, no-wrap
msgid "SCHED_SETSCHEDULER"
msgstr ""
-#. type: TH
-#: build/C/man2/sched_setscheduler.2:47
-#, no-wrap
-msgid "2011-09-19"
-msgstr ""
-
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:51
+#: build/C/man2/sched_setscheduler.2:50
msgid ""
"sched_setscheduler, sched_getscheduler - set and get scheduling "
"policy/parameters"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:56
+#: build/C/man2/sched_setscheduler.2:55
#, no-wrap
msgid "B<int sched_setscheduler(pid_t >I<pid>B<, int >I<policy>B<,>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:58
+#: build/C/man2/sched_setscheduler.2:57
#, no-wrap
msgid "B< const struct sched_param *>I<param>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:60
+#: build/C/man2/sched_setscheduler.2:59
#, no-wrap
msgid "B<int sched_getscheduler(pid_t >I<pid>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:77
+#: build/C/man2/sched_setscheduler.2:76
msgid ""
"B<sched_setscheduler>() sets both the scheduling policy and the associated "
"parameters for the process whose ID is specified in I<pid>. If I<pid> "
msgstr ""
#. type: TP
-#: build/C/man2/sched_setscheduler.2:77
+#: build/C/man2/sched_setscheduler.2:76
#, no-wrap
msgid "B<SCHED_OTHER>"
msgstr ""
#. In the 2.6 kernel sources, SCHED_OTHER is actually called
#. SCHED_NORMAL.
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:82
+#: build/C/man2/sched_setscheduler.2:81
msgid "the standard round-robin time-sharing policy;"
msgstr ""
#. type: TP
-#: build/C/man2/sched_setscheduler.2:82
+#: build/C/man2/sched_setscheduler.2:81
#, no-wrap
msgid "B<SCHED_BATCH>"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:85
+#: build/C/man2/sched_setscheduler.2:84
msgid "for \"batch\" style execution of processes; and"
msgstr ""
#. type: TP
-#: build/C/man2/sched_setscheduler.2:85
+#: build/C/man2/sched_setscheduler.2:84
#, no-wrap
msgid "B<SCHED_IDLE>"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:90
+#: build/C/man2/sched_setscheduler.2:89
msgid "for running I<very> low priority background jobs."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:94
+#: build/C/man2/sched_setscheduler.2:93
msgid ""
"The following \"real-time\" policies are also supported, for special "
"time-critical applications that need precise control over the way in which "
msgstr ""
#. type: TP
-#: build/C/man2/sched_setscheduler.2:94
+#: build/C/man2/sched_setscheduler.2:93
#, no-wrap
msgid "B<SCHED_FIFO>"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:97
+#: build/C/man2/sched_setscheduler.2:96
msgid "a first-in, first-out policy; and"
msgstr ""
#. type: TP
-#: build/C/man2/sched_setscheduler.2:97
+#: build/C/man2/sched_setscheduler.2:96
#, no-wrap
msgid "B<SCHED_RR>"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:100
+#: build/C/man2/sched_setscheduler.2:99
msgid "a round-robin policy."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:102
+#: build/C/man2/sched_setscheduler.2:101
msgid "The semantics of each of these policies are detailed below."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:109
+#: build/C/man2/sched_setscheduler.2:108
msgid ""
"B<sched_getscheduler>() queries the scheduling policy currently applied to "
"the process identified by I<pid>. If I<pid> equals zero, the policy of the "
msgstr ""
#. type: SS
-#: build/C/man2/sched_setscheduler.2:109
+#: build/C/man2/sched_setscheduler.2:108
#, no-wrap
-msgid "Scheduling Policies"
+msgid "Scheduling policies"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:118
+#: build/C/man2/sched_setscheduler.2:117
msgid ""
"The scheduler is the kernel component that decides which runnable process "
"will be executed by the CPU next. Each process has an associated scheduling "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:123
+#: build/C/man2/sched_setscheduler.2:122
msgid ""
"For processes scheduled under one of the normal scheduling policies "
"(B<SCHED_OTHER>, B<SCHED_IDLE>, B<SCHED_BATCH>), I<sched_priority> is not "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:137
+#: build/C/man2/sched_setscheduler.2:136
msgid ""
"Processes scheduled under one of the real-time policies (B<SCHED_FIFO>, "
"B<SCHED_RR>) have a I<sched_priority> value in the range 1 (low) to 99 "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:143
+#: build/C/man2/sched_setscheduler.2:142
msgid ""
"Conceptually, the scheduler maintains a list of runnable processes for each "
"possible I<sched_priority> value. In order to determine which process runs "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:147
+#: build/C/man2/sched_setscheduler.2:146
msgid ""
"A process's scheduling policy determines where it will be inserted into the "
"list of processes with equal static priority and how it will move inside "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:155
+#: build/C/man2/sched_setscheduler.2:154
msgid ""
"All scheduling is preemptive: if a process with a higher static priority "
"becomes ready to run, the currently running process will be preempted and "
msgstr ""
#. type: SS
-#: build/C/man2/sched_setscheduler.2:155
+#: build/C/man2/sched_setscheduler.2:154
#, no-wrap
-msgid "SCHED_FIFO: First In-First Out scheduling"
+msgid "SCHED_FIFO: First in-first out scheduling"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:164
+#: build/C/man2/sched_setscheduler.2:163
msgid ""
"B<SCHED_FIFO> can only be used with static priorities higher than 0, which "
"means that when a B<SCHED_FIFO> processes becomes runnable, it will always "
msgstr ""
#. type: IP
-#: build/C/man2/sched_setscheduler.2:164 build/C/man2/sched_setscheduler.2:169 build/C/man2/sched_setscheduler.2:172 build/C/man2/sched_setscheduler.2:186 build/C/man2/sched_setscheduler.2:288 build/C/man2/sched_setscheduler.2:296 build/C/man2/sched_setscheduler.2:337 build/C/man2/sched_setscheduler.2:345 build/C/man2/sched_setscheduler.2:350 build/C/man2/sched_setscheduler.2:355
+#: build/C/man2/sched_setscheduler.2:163 build/C/man2/sched_setscheduler.2:168 build/C/man2/sched_setscheduler.2:171 build/C/man2/sched_setscheduler.2:185 build/C/man2/sched_setscheduler.2:287 build/C/man2/sched_setscheduler.2:295 build/C/man2/sched_setscheduler.2:336 build/C/man2/sched_setscheduler.2:344 build/C/man2/sched_setscheduler.2:349 build/C/man2/sched_setscheduler.2:354
#, no-wrap
msgid "*"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:169
+#: build/C/man2/sched_setscheduler.2:168
msgid ""
"A B<SCHED_FIFO> process that has been preempted by another process of higher "
"priority will stay at the head of the list for its priority and will resume "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:172
+#: build/C/man2/sched_setscheduler.2:171
msgid ""
"When a B<SCHED_FIFO> process becomes runnable, it will be inserted at the "
"end of the list for its priority."
#. In 2.2.x and 2.4.x, the process is placed at the front of the queue
#. In 2.0.x, the Right Thing happened: the process went to the back -- MTK
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:186
+#: build/C/man2/sched_setscheduler.2:185
msgid ""
"A call to B<sched_setscheduler>() or B<sched_setparam>(2) will put the "
"B<SCHED_FIFO> (or B<SCHED_RR>) process identified by I<pid> at the start of "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:190
+#: build/C/man2/sched_setscheduler.2:189
msgid "A process calling B<sched_yield>(2) will be put at the end of the list."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:194
+#: build/C/man2/sched_setscheduler.2:193
msgid ""
"No other events will move a process scheduled under the B<SCHED_FIFO> policy "
"in the wait list of runnable processes with equal static priority."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:199
+#: build/C/man2/sched_setscheduler.2:198
msgid ""
"A B<SCHED_FIFO> process runs until either it is blocked by an I/O request, "
"it is preempted by a higher priority process, or it calls B<sched_yield>(2)."
msgstr ""
#. type: SS
-#: build/C/man2/sched_setscheduler.2:199
+#: build/C/man2/sched_setscheduler.2:198
#, no-wrap
-msgid "SCHED_RR: Round Robin scheduling"
+msgid "SCHED_RR: Round-robin scheduling"
msgstr ""
#. On Linux 2.4, the length of the RR interval is influenced
#. by the process nice value -- MTK
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:218
+#: build/C/man2/sched_setscheduler.2:217
msgid ""
"B<SCHED_RR> is a simple enhancement of B<SCHED_FIFO>. Everything described "
"above for B<SCHED_FIFO> also applies to B<SCHED_RR>, except that each "
"quantum, it will be put at the end of the list for its priority. A "
"B<SCHED_RR> process that has been preempted by a higher priority process and "
"subsequently resumes execution as a running process will complete the "
-"unexpired portion of its round robin time quantum. The length of the time "
+"unexpired portion of its round-robin time quantum. The length of the time "
"quantum can be retrieved using B<sched_rr_get_interval>(2)."
msgstr ""
#. type: SS
-#: build/C/man2/sched_setscheduler.2:218
+#: build/C/man2/sched_setscheduler.2:217
#, no-wrap
msgid "SCHED_OTHER: Default Linux time-sharing scheduling"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:234
+#: build/C/man2/sched_setscheduler.2:233
msgid ""
"B<SCHED_OTHER> can only be used at static priority 0. B<SCHED_OTHER> is the "
"standard Linux time-sharing scheduler that is intended for all processes "
msgstr ""
#. type: SS
-#: build/C/man2/sched_setscheduler.2:234
+#: build/C/man2/sched_setscheduler.2:233
#, no-wrap
msgid "SCHED_BATCH: Scheduling batch processes"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:246
+#: build/C/man2/sched_setscheduler.2:245
msgid ""
"(Since Linux 2.6.16.) B<SCHED_BATCH> can only be used at static priority "
"0. This policy is similar to B<SCHED_OTHER> in that it schedules the "
#. accompanied Ingo Molnar's patch for the implementation of
#. SCHED_BATCH.
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:255
+#: build/C/man2/sched_setscheduler.2:254
msgid ""
"This policy is useful for workloads that are noninteractive, but do not want "
"to lower their nice value, and for workloads that want a deterministic "
msgstr ""
#. type: SS
-#: build/C/man2/sched_setscheduler.2:255
+#: build/C/man2/sched_setscheduler.2:254
#, no-wrap
msgid "SCHED_IDLE: Scheduling very low priority jobs"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:259
+#: build/C/man2/sched_setscheduler.2:258
msgid ""
"(Since Linux 2.6.23.) B<SCHED_IDLE> can only be used at static priority 0; "
"the process nice value has no influence for this policy."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:267
+#: build/C/man2/sched_setscheduler.2:266
msgid ""
"This policy is intended for running jobs at extremely low priority (lower "
"even than a +19 nice value with the B<SCHED_OTHER> or B<SCHED_BATCH> "
msgstr ""
#. type: SS
-#: build/C/man2/sched_setscheduler.2:267
+#: build/C/man2/sched_setscheduler.2:266
#, no-wrap
msgid "Resetting scheduling policy for child processes"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:283
+#: build/C/man2/sched_setscheduler.2:282
msgid ""
"Since Linux 2.6.32, the B<SCHED_RESET_ON_FORK> flag can be ORed in I<policy> "
"when calling B<sched_setscheduler>(). As a result of including this flag, "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:288
+#: build/C/man2/sched_setscheduler.2:287
msgid ""
"More precisely, if the B<SCHED_RESET_ON_FORK> flag is specified, the "
"following rules apply for subsequently created children:"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:296
+#: build/C/man2/sched_setscheduler.2:295
msgid ""
"If the calling process has a scheduling policy of B<SCHED_FIFO> or "
"B<SCHED_RR>, the policy is reset to B<SCHED_OTHER> in child processes."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:299
+#: build/C/man2/sched_setscheduler.2:298
msgid ""
"If the calling process has a negative nice value, the nice value is reset to "
"zero in child processes."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:308
+#: build/C/man2/sched_setscheduler.2:307
msgid ""
"After the B<SCHED_RESET_ON_FORK> flag has been enabled, it can only be reset "
"if the process has the B<CAP_SYS_NICE> capability. This flag is disabled in "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:314
+#: build/C/man2/sched_setscheduler.2:313
msgid ""
"The B<SCHED_RESET_ON_FORK> flag is visible in the policy value returned by "
"B<sched_getscheduler>()"
msgstr ""
#. type: SS
-#: build/C/man2/sched_setscheduler.2:314
+#: build/C/man2/sched_setscheduler.2:313
#, no-wrap
msgid "Privileges and resource limits"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:327
+#: build/C/man2/sched_setscheduler.2:326
msgid ""
"In Linux kernels before 2.6.12, only privileged (B<CAP_SYS_NICE>) processes "
"can set a nonzero static priority (i.e., set a real-time scheduling "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:337
+#: build/C/man2/sched_setscheduler.2:336
msgid ""
"Since Linux 2.6.12, the B<RLIMIT_RTPRIO> resource limit defines a ceiling on "
"an unprivileged process's static priority for the B<SCHED_RR> and "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:345
+#: build/C/man2/sched_setscheduler.2:344
msgid ""
"If an unprivileged process has a nonzero B<RLIMIT_RTPRIO> soft limit, then "
"it can change its scheduling policy and priority, subject to the restriction "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:350
+#: build/C/man2/sched_setscheduler.2:349
msgid ""
"If the B<RLIMIT_RTPRIO> soft limit is 0, then the only permitted changes are "
"to lower the priority, or to switch to a non-real-time policy."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:355
+#: build/C/man2/sched_setscheduler.2:354
msgid ""
"Subject to the same rules, another unprivileged process can also make these "
"changes, as long as the effective user ID of the process making the change "
#. commit c02aa73b1d18e43cfd79c2f193b225e84ca497c8
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:373
+#: build/C/man2/sched_setscheduler.2:372
msgid ""
"Special rules apply for the B<SCHED_IDLE>. In Linux kernels before 2.6.39, "
"an unprivileged process operating under this policy cannot change its "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:384
+#: build/C/man2/sched_setscheduler.2:383
msgid ""
"Privileged (B<CAP_SYS_NICE>) processes ignore the B<RLIMIT_RTPRIO> limit; "
"as with older kernels, they can make arbitrary changes to scheduling policy "
msgstr ""
#. type: SS
-#: build/C/man2/sched_setscheduler.2:384
+#: build/C/man2/sched_setscheduler.2:383
#, no-wrap
msgid "Response time"
msgstr ""
#. as described in
#. .BR request_irq (9).
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:392
+#: build/C/man2/sched_setscheduler.2:391
msgid ""
"A blocked high priority process waiting for the I/O has a certain response "
"time before it is scheduled again. The device driver writer can greatly "
msgstr ""
#. type: SS
-#: build/C/man2/sched_setscheduler.2:392
+#: build/C/man2/sched_setscheduler.2:391
#, no-wrap
msgid "Miscellaneous"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:397
+#: build/C/man2/sched_setscheduler.2:396
msgid ""
"Child processes inherit the scheduling policy and parameters across a "
"B<fork>(2). The scheduling policy and parameters are preserved across "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:403
+#: build/C/man2/sched_setscheduler.2:402
msgid ""
"Memory locking is usually needed for real-time processes to avoid paging "
"delays; this can be done with B<mlock>(2) or B<mlockall>(2)."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:415
+#: build/C/man2/sched_setscheduler.2:414
msgid ""
"Since a nonblocking infinite loop in a process scheduled under B<SCHED_FIFO> "
"or B<SCHED_RR> will block all processes with lower priority forever, a "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:423
+#: build/C/man2/sched_setscheduler.2:422
msgid ""
"POSIX systems on which B<sched_setscheduler>() and B<sched_getscheduler>() "
"are available define B<_POSIX_PRIORITY_SCHEDULING> in I<E<lt>unistd.hE<gt>>."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:433
+#: build/C/man2/sched_setscheduler.2:432
msgid ""
"On success, B<sched_setscheduler>() returns zero. On success, "
"B<sched_getscheduler>() returns the policy for the process (a nonnegative "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:439
+#: build/C/man2/sched_setscheduler.2:438
msgid ""
"The scheduling I<policy> is not one of the recognized policies, I<param> is "
"NULL, or I<param> does not make sense for the I<policy>."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:442
+#: build/C/man2/sched_setscheduler.2:441
msgid "The calling process does not have appropriate privileges."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:448
+#: build/C/man2/sched_setscheduler.2:447
msgid ""
"POSIX.1-2001 (but see BUGS below). The B<SCHED_BATCH> and B<SCHED_IDLE> "
"policies are Linux-specific."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:456
+#: build/C/man2/sched_setscheduler.2:455
msgid ""
"POSIX.1 does not detail the permissions that an unprivileged process "
"requires in order to call B<sched_setscheduler>(), and details vary across "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:466
+#: build/C/man2/sched_setscheduler.2:476
+msgid ""
+"The scheduling policy and parameters are in fact per-thread attributes on "
+"Linux. The value returned from a call to B<gettid>(2) can be passed in the "
+"argument I<pid>. Specifying I<pid> as 0 will operate on the attribute for "
+"the calling thread, and passing the value returned from a call to "
+"B<getpid>(2) will operate on the attribute for the main thread of the "
+"thread group. (If you are using the POSIX threads API, then use "
+"B<pthread_setschedparam>(3), B<pthread_getschedparam>(3), and "
+"B<pthread_setschedprio>(3), instead of the B<sched_*>(2) system calls.)"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/sched_setscheduler.2:486
msgid ""
"Originally, Standard Linux was intended as a general-purpose operating "
"system being able to handle background processes, interactive applications, "
msgstr ""
#. type: SS
-#: build/C/man2/sched_setscheduler.2:466
+#: build/C/man2/sched_setscheduler.2:486
#, no-wrap
msgid "Real-time features in the mainline Linux kernel"
msgstr ""
#. FIXME . Probably this text will need some minor tweaking
#. by about the time of 2.6.30; ask Carsten Emde about this then.
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:480
+#: build/C/man2/sched_setscheduler.2:500
msgid ""
"From kernel version 2.6.18 onward, however, Linux is gradually becoming "
"equipped with real-time capabilities, most of which are derived from the "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:484
+#: build/C/man2/sched_setscheduler.2:504
#, no-wrap
msgid "patch-I<kernelversion>-rtI<patchversion>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:489
+#: build/C/man2/sched_setscheduler.2:510
msgid ""
-"and can be downloaded from "
-"I<http://www.kernel.org/pub/linux/kernel/projects/rt/>."
+"and can be downloaded from E<.UR "
+"http://www.kernel.org\\:/pub\\:/linux\\:/kernel\\:/projects\\:/rt/> E<.UE .>"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:498
+#: build/C/man2/sched_setscheduler.2:519
msgid ""
"Without the patches and prior to their full inclusion into the mainline "
"kernel, the kernel configuration offers only the three preemption classes "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:509
+#: build/C/man2/sched_setscheduler.2:530
msgid ""
"With the patches applied or after their full inclusion into the mainline "
"kernel, the additional configuration item B<CONFIG_PREEMPT_RT> becomes "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:517
+#: build/C/man2/sched_setscheduler.2:538
msgid ""
"POSIX says that on success, B<sched_setscheduler>() should return the "
"previous scheduling policy. Linux B<sched_setscheduler>() does not conform "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:535
+#: build/C/man2/sched_setscheduler.2:559
msgid ""
-"B<getpriority>(2), B<mlock>(2), B<mlockall>(2), B<munlock>(2), "
+"B<chrt>(1), B<getpriority>(2), B<mlock>(2), B<mlockall>(2), B<munlock>(2), "
"B<munlockall>(2), B<nice>(2), B<sched_get_priority_max>(2), "
"B<sched_get_priority_min>(2), B<sched_getaffinity>(2), B<sched_getparam>(2), "
"B<sched_rr_get_interval>(2), B<sched_setaffinity>(2), B<sched_setparam>(2), "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_setscheduler.2:542
+#: build/C/man2/sched_setscheduler.2:567
msgid ""
-"The kernel source file I<Documentation/scheduler/sched-rt-group.txt> (since "
-"kernel 2.6.25)."
+"I<Documentation/scheduler/sched-rt-group.txt> in the Linux kernel source "
+"tree (since kernel 2.6.25)."
msgstr ""
#. type: TH
-#: build/C/man2/sched_yield.2:30
+#: build/C/man2/sched_yield.2:29
#, no-wrap
msgid "SCHED_YIELD"
msgstr ""
#. type: TH
-#: build/C/man2/sched_yield.2:30
+#: build/C/man2/sched_yield.2:29
#, no-wrap
msgid "2008-10-18"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_yield.2:33
+#: build/C/man2/sched_yield.2:32
msgid "sched_yield - yield the processor"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_yield.2:37
+#: build/C/man2/sched_yield.2:36
msgid "B<int sched_yield(void);>"
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_yield.2:42
+#: build/C/man2/sched_yield.2:41
msgid ""
"B<sched_yield>() causes the calling thread to relinquish the CPU. The "
"thread is moved to the end of the queue for its static priority and a new "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_yield.2:49
+#: build/C/man2/sched_yield.2:48
msgid ""
"On success, B<sched_yield>() returns 0. On error, -1 is returned, and "
"I<errno> is set appropriately."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_yield.2:53
+#: build/C/man2/sched_yield.2:52
msgid "In the Linux implementation, B<sched_yield>() always succeeds."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_yield.2:60
+#: build/C/man2/sched_yield.2:59
msgid ""
"If the calling thread is the only thread in the highest priority list at "
"that time, it will continue to run after a call to B<sched_yield>()."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_yield.2:66
+#: build/C/man2/sched_yield.2:65
msgid ""
"POSIX systems on which B<sched_yield>() is available define "
"B<_POSIX_PRIORITY_SCHEDULING> in I<E<lt>unistd.hE<gt>>."
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_yield.2:79
+#: build/C/man2/sched_yield.2:78
msgid ""
"Strategic calls to B<sched_yield>() can improve performance by giving other "
"threads or processes a chance to run when (heavily) contended resources "
msgstr ""
#. type: Plain text
-#: build/C/man2/sched_yield.2:82
-msgid "B<sched_setscheduler>(2) for a description of Linux scheduling."
+#: build/C/man2/sched_yield.2:81
+msgid "B<sched_setscheduler>(2) for a description of Linux scheduling"
msgstr ""
#. type: TH
-#: build/C/man2/setns.2:4
+#: build/C/man2/setns.2:8
#, no-wrap
msgid "SETNS"
msgstr ""
-#. type: TH
-#: build/C/man2/setns.2:4
-#, no-wrap
-msgid "2012-05-04"
-msgstr ""
-
#. type: Plain text
-#: build/C/man2/setns.2:7
+#: build/C/man2/setns.2:11
msgid "setns - reassociate thread with a namespace"
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:13
+#: build/C/man2/setns.2:17
#, no-wrap
msgid "B<int setns(int >I<fd>B<, int >I<nstype>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:17
+#: build/C/man2/setns.2:21
msgid ""
"Given a file descriptor referring to a namespace, reassociate the calling "
"thread with that namespace."
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:30
+#: build/C/man2/setns.2:34
msgid ""
"The I<fd> argument is a file descriptor referring to one of the namespace "
"entries in a I</proc/[pid]/ns/> directory; see B<proc>(5) for further "
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:36
+#: build/C/man2/setns.2:40
msgid ""
"The I<nstype> argument specifies which type of namespace the calling thread "
"may be reassociated with. This argument can have one of the following "
msgstr ""
#. type: TP
-#: build/C/man2/setns.2:36
+#: build/C/man2/setns.2:40
#, no-wrap
msgid "B<0>"
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:39
+#: build/C/man2/setns.2:43
msgid "Allow any type of namespace to be joined."
msgstr ""
#. type: TP
-#: build/C/man2/setns.2:39
+#: build/C/man2/setns.2:43
#, no-wrap
msgid "B<CLONE_NEWIPC>"
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:43
+#: build/C/man2/setns.2:47
msgid "I<fd> must refer to an IPC namespace."
msgstr ""
#. type: TP
-#: build/C/man2/setns.2:43
+#: build/C/man2/setns.2:47
#, no-wrap
msgid "B<CLONE_NEWNET>"
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:47
+#: build/C/man2/setns.2:51
msgid "I<fd> must refer to a network namespace."
msgstr ""
#. type: TP
-#: build/C/man2/setns.2:47
+#: build/C/man2/setns.2:51
#, no-wrap
msgid "B<CLONE_NEWUTS>"
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:51
+#: build/C/man2/setns.2:55
msgid "I<fd> must refer to a UTS namespace."
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:66
+#: build/C/man2/setns.2:70
msgid ""
"Specifying I<nstype> as 0 suffices if the caller knows (or does not care) "
"what type of namespace is referred to by I<fd>. Specifying a nonzero value "
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:73
+#: build/C/man2/setns.2:77
msgid ""
"On success, I<setns>() returns 0. On failure, -1 is returned and I<errno> "
"is set to indicate the error."
msgstr ""
-#. type: TP
-#: build/C/man2/setns.2:74
-#, no-wrap
-msgid "B<EBADF>"
-msgstr ""
-
#. type: Plain text
-#: build/C/man2/setns.2:78
+#: build/C/man2/setns.2:82
msgid "I<fd> is not a valid file descriptor."
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:85
+#: build/C/man2/setns.2:89
msgid ""
"I<fd> refers to a namespace whose type does not match that specified in "
"I<nstype>, or there is problem with reassociating the the thread with the "
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:88
+#: build/C/man2/setns.2:92
msgid "Cannot allocate sufficient memory to change the specified namespace."
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:93
+#: build/C/man2/setns.2:97
msgid ""
"The calling thread did not have the required privilege (B<CAP_SYS_ADMIN>) "
"for this operation."
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:98
+#: build/C/man2/setns.2:102
msgid ""
"The B<setns>() system call first appeared in Linux in kernel 3.0; library "
"support was added to glibc in version 2.14."
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:102
+#: build/C/man2/setns.2:106
msgid "The B<setns>() system call is Linux-specific."
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:108
+#: build/C/man2/setns.2:112
msgid ""
"Not all of the attributes that can be shared when a new thread is created "
"using B<clone>(2) can be changed using B<setns>()."
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:116
+#: build/C/man2/setns.2:121
+msgid ""
+"The program below takes two or more arguments. The first argument specifies "
+"the pathname of a namespace file in an existing I</proc/[pid]/ns/> "
+"directory. The remaining arguments specify a command and its arguments. "
+"The program opens the namespace file, joins that namespace using B<setns>(), "
+"and executes the specified command inside that namespace."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/setns.2:131
+msgid ""
+"The following shell session demonstrates the use of this program (compiled "
+"as a binary named I<ns_exec>) in conjunction with the B<CLONE_NEWUTS> "
+"example program in the B<clone>(2) man page (complied as a binary named "
+"I<newuts>)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/setns.2:139
+msgid ""
+"We begin by executing the example program in B<clone>(2) in the "
+"background. That program creates a child in a separate UTS namespace. The "
+"child changes the hostname in its namespace, and then both processes display "
+"the hostnames in their UTS namespaces, so that we can see that they are "
+"different."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/setns.2:151
+#, no-wrap
+msgid ""
+"$ B<su> # Need privilege for namespace operations\n"
+"Password:\n"
+"# B<./newuts bizarro &>\n"
+"[1] 3549\n"
+"clone() returned 3550\n"
+"uts.nodename in child: bizarro\n"
+"uts.nodename in parent: antero\n"
+"# B<uname -n> # Verify hostname in the shell\n"
+"antero\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/setns.2:158
+msgid ""
+"We then run the program shown below, using it to execute a shell. Inside "
+"that shell, we verify that the hostname is the one set by the child created "
+"by the first program:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/setns.2:164
+#, no-wrap
+msgid ""
+"# B<./ns_exec /proc/3550/ns/uts /bin/bash>\n"
+"# B<uname -n> # Executed in shell started by ns_exec\n"
+"bizarro\n"
+msgstr ""
+
+#. type: SS
+#: build/C/man2/setns.2:166
+#, no-wrap
+msgid "Program source"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/setns.2:174
+#, no-wrap
+msgid ""
+"#define _GNU_SOURCE\n"
+"#include E<lt>fcntl.hE<gt>\n"
+"#include E<lt>sched.hE<gt>\n"
+"#include E<lt>unistd.hE<gt>\n"
+"#include E<lt>stdlib.hE<gt>\n"
+"#include E<lt>stdio.hE<gt>\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/setns.2:182
+#, no-wrap
+msgid ""
+"int\n"
+"main(int argc, char *argv[])\n"
+"{\n"
+" int fd;\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/setns.2:187
+#, no-wrap
+msgid ""
+" if (argc E<lt> 3) {\n"
+" fprintf(stderr, \"%s /proc/PID/ns/FILE cmd args...\\en\", "
+"argv[0]);\n"
+" exit(EXIT_FAILURE);\n"
+" }\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/setns.2:191
+#, no-wrap
+msgid ""
+" fd = open(argv[1], O_RDONLY); /* Get descriptor for namespace */\n"
+" if (fd == -1)\n"
+" errExit(\"open\");\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/setns.2:194
+#, no-wrap
+msgid ""
+" if (setns(fd, 0) == -1) /* Join that namespace */\n"
+" errExit(\"setns\");\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/setns.2:198
+#, no-wrap
msgid ""
-"The PID namespace and the mount namespace are not currently supported. (See "
-"the descriptions of B<CLONE_NEWPID> and B<CLONE_NEWNS> in B<clone>(2).)"
+" execvp(argv[2], &argv[2]); /* Execute a command in namespace */\n"
+" errExit(\"execvp\");\n"
+"}\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/setns.2:122
+#: build/C/man2/setns.2:205
msgid "B<clone>(2), B<fork>(2), B<vfork>(2), B<proc>(5), B<unix>(7)"
msgstr ""
#. type: TH
-#: build/C/man2/unshare.2:17
+#: build/C/man2/unshare.2:20
#, no-wrap
msgid "UNSHARE"
msgstr ""
#. type: TH
-#: build/C/man2/unshare.2:17
+#: build/C/man2/unshare.2:20
#, no-wrap
-msgid "2010-10-30"
+msgid "2012-12-31"
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:20
+#: build/C/man2/unshare.2:23
msgid "unshare - disassociate parts of the process execution context"
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:28
+#: build/C/man2/unshare.2:31
#, no-wrap
msgid "B<int unshare(int >I<flags>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:41
+#: build/C/man2/unshare.2:44
msgid ""
"B<unshare>() allows a process to disassociate parts of its execution "
"context that are currently being shared with other processes. Part of the "
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:46
+#: build/C/man2/unshare.2:49
msgid ""
"The main use of B<unshare>() is to allow a process to control its shared "
"execution context without creating a new process."
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:53
+#: build/C/man2/unshare.2:56
msgid ""
"The I<flags> argument is a bit mask that specifies which parts of the "
"execution context should be unshared. This argument is specified by ORing "
"together zero or more of the following constants:"
msgstr ""
+#. type: TP
+#: build/C/man2/unshare.2:56
+#, no-wrap
+msgid "B<CLONE_FILES>"
+msgstr ""
+
#. type: Plain text
-#: build/C/man2/unshare.2:61
+#: build/C/man2/unshare.2:64
msgid ""
"Reverse the effect of the B<clone>(2) B<CLONE_FILES> flag. Unshare the "
"file descriptor table, so that the calling process no longer shares its file "
"descriptors with any other process."
msgstr ""
+#. type: TP
+#: build/C/man2/unshare.2:64
+#, no-wrap
+msgid "B<CLONE_FS>"
+msgstr ""
+
#. type: Plain text
-#: build/C/man2/unshare.2:74
+#: build/C/man2/unshare.2:78
msgid ""
"Reverse the effect of the B<clone>(2) B<CLONE_FS> flag. Unshare file "
"system attributes, so that the calling process no longer shares its root "
-"directory, current directory, or umask attributes with any other process. "
-"B<chroot>(2), B<chdir>(2), or B<umask>(2)"
+"directory (B<chroot>(2)), current directory (B<chdir>(2)), or umask "
+"(B<umask>(2)) attributes with any other process."
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:91
+#: build/C/man2/unshare.2:95
msgid ""
"This flag has the same effect as the B<clone>(2) B<CLONE_NEWIPC> flag. "
"Unshare the System V IPC namespace, so that the calling process has a "
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:105
+#: build/C/man2/unshare.2:110
msgid ""
"This flag has the same effect as the B<clone>(2) B<CLONE_NEWNET> flag. "
"Unshare the network namespace, so that the calling process is moved into a "
"new network namespace which is not shared with any previously existing "
-"process. B<CLONE_NEWNET> requires the B<CAP_SYS_ADMIN> capability."
+"process. Use of B<CLONE_NEWNET> requires the B<CAP_SYS_ADMIN> capability."
msgstr ""
#. type: TP
-#: build/C/man2/unshare.2:105
+#: build/C/man2/unshare.2:110
#, no-wrap
msgid "B<CLONE_NEWNS>"
msgstr ""
#. CLONE_FS, and CLONE_FILES reverse the action of the clone()
#. flags of the same name.
#. type: Plain text
-#: build/C/man2/unshare.2:126
+#: build/C/man2/unshare.2:131
msgid ""
"This flag has the same effect as the B<clone>(2) B<CLONE_NEWNS> flag. "
"Unshare the mount namespace, so that the calling process has a private copy "
"requires the B<CAP_SYS_ADMIN> capability."
msgstr ""
+#. type: Plain text
+#: build/C/man2/unshare.2:145
+msgid ""
+"This flag has the same effect as the B<clone>(2) B<CLONE_NEWUTS> flag. "
+"Unshare the UTS IPC namespace, so that the calling process has a private "
+"copy of the UTS namespace which is not shared with any other process. Use "
+"of B<CLONE_NEWUTS> requires the B<CAP_SYS_ADMIN> capability."
+msgstr ""
+
#. type: TP
-#: build/C/man2/unshare.2:126
+#: build/C/man2/unshare.2:145
#, no-wrap
msgid "B<CLONE_SYSVSEM> (since Linux 2.6.26)"
msgstr ""
-#. type: Plain text
-#: build/C/man2/unshare.2:140
-msgid ""
-"This flag reverses the effect of the B<clone>(2) B<CLONE_SYSVSEM> flag. "
-"Unshare System V semaphore undo values, so that the calling process has a "
-"private copy which is not shared with any other process. Use of "
-"B<CLONE_SYSVSEM> requires the B<CAP_SYS_ADMIN> capability."
-msgstr ""
-
+#. commit 9edff4ab1f8d82675277a04e359d0ed8bf14a7b7
#. As at 2.6.16, the following forced implications also apply,
#. although the relevant flags are not yet implemented.
#. If CLONE_THREAD is set force CLONE_VM.
#. Unshare virtual memory, so that the calling process no
#. longer shares its virtual address space with any other process.
#. type: Plain text
-#: build/C/man2/unshare.2:176
+#: build/C/man2/unshare.2:182
msgid ""
-"This flag has the same effect as the B<clone>(2) B<CLONE_NEWUTS> flag. "
-"Unshare the UTS IPC namespace, so that the calling process has a private "
-"copy of the UTS namespace which is not shared with any other process. Use "
-"of B<CLONE_NEWUTS> requires the B<CAP_SYS_ADMIN> capability."
+"This flag reverses the effect of the B<clone>(2) B<CLONE_SYSVSEM> flag. "
+"Unshare System V semaphore undo values, so that the calling process has a "
+"private copy which is not shared with any other process. Use of "
+"B<CLONE_SYSVSEM> requires the B<CAP_SYS_ADMIN> capability."
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:183
+#: build/C/man2/unshare.2:189
msgid ""
"If I<flags> is specified as zero, then B<unshare>() is a no-op; no changes "
"are made to the calling process's execution context."
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:188
+#: build/C/man2/unshare.2:194
msgid ""
"On success, zero returned. On failure, -1 is returned and I<errno> is set "
"to indicate the error."
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:193
+#: build/C/man2/unshare.2:199
msgid "An invalid bit was specified in I<flags>."
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:197
+#: build/C/man2/unshare.2:203
msgid ""
"Cannot allocate sufficient memory to copy parts of caller's context that "
"need to be unshared."
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:200
+#: build/C/man2/unshare.2:206
msgid "The calling process did not have the required privileges for this operation."
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:204
+#: build/C/man2/unshare.2:210
msgid "The B<unshare>() system call was added to Linux in kernel 2.6.16."
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:208
+#: build/C/man2/unshare.2:214
msgid "The B<unshare>() system call is Linux-specific."
msgstr ""
+#. FIXME all of the following needs to be reviewed for the current kernel
#. However, we can do unshare(CLONE_SIGHAND) if CLONE_SIGHAND
#. was not specified when doing clone(); i.e., unsharing
#. signal handlers is permitted if we are not actually
#. sharing signal handlers. mtk
-#. FIXME . check future kernel versions (e.g., 2.6.17)
-#. to see if CLONE_VM gets implemented.
-#. However, as at 2.6.16, we can do unshare(CLONE_VM) if CLONE_VM
+#. However, we can do unshare(CLONE_VM) if CLONE_VM
#. was not specified when doing clone(); i.e., unsharing
#. virtual memory is permitted if we are not actually
#. sharing virtual memory. mtk
#. be incrementally added to unshare without affecting legacy
#. applications using unshare.
#. type: Plain text
-#: build/C/man2/unshare.2:244
+#: build/C/man2/unshare.2:248
msgid ""
"Not all of the process attributes that can be shared when a new process is "
"created using B<clone>(2) can be unshared using B<unshare>(). In "
-"particular, as at kernel 2.6.16, B<unshare>() does not implement flags that "
-"reverse the effects of B<CLONE_SIGHAND>, B<CLONE_SYSVSEM>, B<CLONE_THREAD>, "
-"or B<CLONE_VM>. Such functionality may be added in the future, if required."
+"particular, as at kernel 3.8, B<unshare>() does not implement flags that "
+"reverse the effects of B<CLONE_SIGHAND>, B<CLONE_THREAD>, or B<CLONE_VM>. "
+"Such functionality may be added in the future, if required."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/unshare.2:254
+msgid "B<clone>(2), B<fork>(2), B<kcmp>(2), B<setns>(2), B<vfork>(2)"
msgstr ""
#. type: Plain text
-#: build/C/man2/unshare.2:249
-msgid "B<clone>(2), B<fork>(2), B<vfork>(2), Documentation/unshare.txt"
+#: build/C/man2/unshare.2:257
+msgid "I<Documentation/unshare.txt> in the Linux kernel source tree"
msgstr ""