Debian Codegraph @

po/pt_BR/man2/pivot_root.2.po

raw
1 # Brazilian Portuguese translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # André Luiz Fassone <[email protected]>, 2001.
5 # Ricardo C.O.Freitas <[email protected]>, 2001.
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: manpages-l10n\n"
9 "POT-Creation-Date: 2026-06-05 06:35+0200\n"
10 "PO-Revision-Date: 2001-06-02 19:20-0300\n"
11 "Last-Translator: Ricardo C.O.Freitas <[email protected]>\n"
12 "Language-Team: Brazilian Portuguese <debian-l10n-"
13 "[email protected]>\n"
14 "Language: pt_BR\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
19 "X-Generator: Virtaal 1.0.0-beta1\n"
20
21 #. type: TH
22 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
23 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
24 #, no-wrap
25 msgid "pivot_root"
26 msgstr "pivot_root"
27
28 #. type: TH
29 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
30 #: opensuse-tumbleweed
31 #, no-wrap
32 msgid "2026-02-08"
33 msgstr "8 fevereiro 2026"
34
35 #. type: TH
36 #: archlinux debian-unstable
37 #, fuzzy, no-wrap
38 #| msgid "Linux man-pages 6.17"
39 msgid "Linux man-pages 6.18"
40 msgstr "Linux man-pages 6.17"
41
42 #. type: SH
43 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
44 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
45 #, no-wrap
46 msgid "NAME"
47 msgstr "NOME"
48
49 #. type: Plain text
50 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
51 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
52 #, fuzzy
53 #| msgid "pivot_root - change the root file system"
54 msgid "pivot_root - change the root mount"
55 msgstr "pivot_root - muda o sistema de arquivo raiz"
56
57 #. type: SH
58 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
59 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
60 #, no-wrap
61 msgid "LIBRARY"
62 msgstr "BIBLIOTECA"
63
64 #. type: Plain text
65 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
66 #: opensuse-leap-16-1 opensuse-tumbleweed
67 msgid "Standard C library (I<libc>,\\ I<-lc>)"
68 msgstr "Biblioteca C Padrão (I<libc>,\\ I<-lc>)"
69
70 #. type: SH
71 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
72 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
73 #, no-wrap
74 msgid "SYNOPSIS"
75 msgstr "SINOPSE"
76
77 #. type: Plain text
78 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
79 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
80 #, no-wrap
81 msgid ""
82 "B<#include E<lt>sys/syscall.hE<gt>> /* Definition of B<SYS_*> constants */\n"
83 "B<#include E<lt>unistd.hE<gt>>\n"
84 msgstr ""
85 "B<#include E<lt>sys/syscall.hE<gt>> /* Definição das constantes B<SYS_*> */\n"
86 "B<#include E<lt>unistd.hE<gt>>\n"
87
88 #. type: Plain text
89 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
90 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
91 #, fuzzy, no-wrap
92 #| msgid "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
93 msgid "B<int syscall(SYS_pivot_root, const char *>I<new_root>B<, const char *>I<put_old>B<);>\n"
94 msgstr "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
95
96 #. type: Plain text
97 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
98 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
99 msgid ""
100 "I<Note>: glibc provides no wrapper for B<pivot_root>(), necessitating the "
101 "use of B<syscall>(2)."
102 msgstr ""
103
104 #. type: SH
105 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
106 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
107 #, no-wrap
108 msgid "DESCRIPTION"
109 msgstr "DESCRIÇÃO"
110
111 #. type: Plain text
112 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
113 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
114 msgid ""
115 "B<pivot_root>() changes the root mount in the mount namespace of the "
116 "calling process. More precisely, it moves the root mount to the directory "
117 "I<put_old> and makes I<new_root> the new root mount. The calling process "
118 "must have the B<CAP_SYS_ADMIN> capability in the user namespace that owns "
119 "the caller's mount namespace."
120 msgstr ""
121
122 #. type: Plain text
123 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
124 #: opensuse-tumbleweed
125 msgid ""
126 "B<pivot_root>() changes the root directory and the current working "
127 "directory of each process or thread in the same mount namespace to "
128 "I<new_root> if they point to the old root directory. (See also NOTES.) On "
129 "the other hand, B<pivot_root>() does not change the caller's current "
130 "working directory (unless it is on the old root directory), and thus it "
131 "should be followed by a I<chdir(\"/\")> call."
132 msgstr ""
133
134 #. type: Plain text
135 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
136 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
137 #, fuzzy
138 #| msgid "The following restrictions apply to I<new_root> and I<put_old>:"
139 msgid "The following restrictions apply:"
140 msgstr "As seguintes restrições aplicadas para I<new_root> e I<put_old>:"
141
142 #. type: IP
143 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
144 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
145 #, no-wrap
146 msgid "\\[bu]"
147 msgstr "\\[bu]"
148
149 #. type: Plain text
150 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
151 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
152 #, fuzzy
153 #| msgid "I<new_root> or I<put_old> is not a directory."
154 msgid "I<new_root> and I<put_old> must be directories."
155 msgstr "I<new_root> ou I<put_old> não é um diretório."
156
157 #. type: Plain text
158 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
159 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
160 #, fuzzy
161 #| msgid ""
162 #| "I<new_root> and I<put_old> must not be on the same file system as the "
163 #| "current root."
164 msgid ""
165 "I<new_root> and I<put_old> must not be on the same mount as the current root."
166 msgstr ""
167 "I<new_root> e I<put_old> não deve estar no mesmo sistema de arquivos da "
168 "atual raiz."
169
170 #. type: Plain text
171 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
172 #: opensuse-tumbleweed
173 #, fuzzy
174 #| msgid ""
175 #| "I<put_old> must be underneath I<new_root>, i.e. adding a non-zero number "
176 #| "of B</..> to the string pointed to by I<put_old> must yield the same "
177 #| "directory as I<new_root>."
178 msgid ""
179 "I<put_old> must be at or underneath I<new_root>; that is, adding some "
180 "nonnegative number of \\[dq]I</..\\&>\\[dq] suffixes to the pathname pointed "
181 "to by I<put_old> must yield the same directory as I<new_root>."
182 msgstr ""
183 "I<put_old> deve ser abaixo de I<new_root>, por exemplo adicionando um número "
184 "diferente de zero B</..> para a string apontada por I<put_old> deve render o "
185 "mesmo diretório como I<new_root>."
186
187 #. type: Plain text
188 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
189 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
190 msgid ""
191 "I<new_root> must be a path to a mount point, but can't be I<\\[dq]/\\[dq]>. "
192 "A path that is not already a mount point can be converted into one by bind "
193 "mounting the path onto itself."
194 msgstr ""
195
196 #. type: Plain text
197 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
198 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
199 msgid ""
200 "The propagation type of the parent mount of I<new_root> and the parent mount "
201 "of the current root directory must not be B<MS_SHARED>; similarly, if "
202 "I<put_old> is an existing mount point, its propagation type must not be "
203 "B<MS_SHARED>. These restrictions ensure that B<pivot_root>() never "
204 "propagates any changes to another mount namespace."
205 msgstr ""
206
207 #. type: Plain text
208 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
209 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
210 msgid "The current root directory must be a mount point."
211 msgstr ""
212
213 #. type: SH
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 #, no-wrap
217 msgid "RETURN VALUE"
218 msgstr "VALOR DE RETORNO"
219
220 #. type: Plain text
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 msgid ""
224 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
225 "to indicate the error."
226 msgstr ""
227 "Em caso de sucesso, zero é retornado. Em caso de erro, -1 é retornado, e "
228 "I<errno> é definido para indicar o erro."
229
230 #. type: SH
231 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
232 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
233 #, no-wrap
234 msgid "ERRORS"
235 msgstr "ERROS"
236
237 #. type: Plain text
238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
240 #, fuzzy
241 #| msgid ""
242 #| "B<pivot_root> may return (in I<errno>) any of the errors returned by "
243 #| "B<stat(2)>. Additionally, it may return:"
244 msgid ""
245 "B<pivot_root>() may fail with any of the same errors as B<stat>(2). "
246 "Additionally, it may fail with the following errors:"
247 msgstr ""
248 "B<pivot_root> pode devolver (para I<errno>) qualquer dos erros devolvidos "
249 "por B<stat(2)> e adicionalmente:"
250
251 #. type: TP
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 #, no-wrap
255 msgid "B<EBUSY>"
256 msgstr "B<EBUSY>"
257
258 #. #-#-#-#-# archlinux: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
259 #. Reconfirmed that the following error occurs on Linux 5.0 by
260 #. specifying 'new_root' as "/rootfs" and 'put_old' as
261 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
262 #. itself. Of course, this is an odd situation, since a later check
263 #. in the kernel code will in any case yield EINVAL if 'new_root' is
264 #. not a mount point. However, when the system call was first added,
265 #. 'new_root' was not required to be a mount point. So, this
266 #. error is nowadays probably just the result of crufty accumulation.
267 #. This error can also occur if we bind mount "/" on top of itself
268 #. and try to specify "/" as the 'new' (again, an odd situation). So,
269 #. the EBUSY check in the kernel does still seem necessary to prevent
270 #. that case. Furthermore, the "or put_old" piece is probably
271 #. redundant text (although the check is in the kernel), since,
272 #. in another check, 'put_old' is required to be under 'new_root'.
273 #. type: Plain text
274 #. #-#-#-#-# debian-trixie: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
275 #. Reconfirmed that the following error occurs on Linux 5.0 by
276 #. specifying 'new_root' as "/rootfs" and 'put_old' as
277 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
278 #. itself. Of course, this is an odd situation, since a later check
279 #. in the kernel code will in any case yield EINVAL if 'new_root' is
280 #. not a mount point. However, when the system call was first added,
281 #. 'new_root' was not required to be a mount point. So, this
282 #. error is nowadays probably just the result of crufty accumulation.
283 #. This error can also occur if we bind mount "/" on top of itself
284 #. and try to specify "/" as the 'new' (again, an odd situation). So,
285 #. the EBUSY check in the kernel does still seem necessary to prevent
286 #. that case. Furthermore, the "or put_old" piece is probably
287 #. redundant text (although the check is in the kernel), since,
288 #. in another check, 'put_old' is required to be under 'new_root'.
289 #. type: Plain text
290 #. #-#-#-#-# debian-unstable: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
291 #. Reconfirmed that the following error occurs on Linux 5.0 by
292 #. specifying 'new_root' as "/rootfs" and 'put_old' as
293 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
294 #. itself. Of course, this is an odd situation, since a later check
295 #. in the kernel code will in any case yield EINVAL if 'new_root' is
296 #. not a mount point. However, when the system call was first added,
297 #. 'new_root' was not required to be a mount point. So, this
298 #. error is nowadays probably just the result of crufty accumulation.
299 #. This error can also occur if we bind mount "/" on top of itself
300 #. and try to specify "/" as the 'new' (again, an odd situation). So,
301 #. the EBUSY check in the kernel does still seem necessary to prevent
302 #. that case. Furthermore, the "or put_old" piece is probably
303 #. redundant text (although the check is in the kernel), since,
304 #. in another check, 'put_old' is required to be under 'new_root'.
305 #. type: Plain text
306 #. #-#-#-#-# fedora-44: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
307 #. Reconfirmed that the following error occurs on Linux 5.0 by
308 #. specifying 'new_root' as "/rootfs" and 'put_old' as
309 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
310 #. itself. Of course, this is an odd situation, since a later check
311 #. in the kernel code will in any case yield EINVAL if 'new_root' is
312 #. not a mount point. However, when the system call was first added,
313 #. 'new_root' was not required to be a mount point. So, this
314 #. error is nowadays probably just the result of crufty accumulation.
315 #. This error can also occur if we bind mount "/" on top of itself
316 #. and try to specify "/" as the 'new' (again, an odd situation). So,
317 #. the EBUSY check in the kernel does still seem necessary to prevent
318 #. that case. Furthermore, the "or put_old" piece is probably
319 #. redundant text (although the check is in the kernel), since,
320 #. in another check, 'put_old' is required to be under 'new_root'.
321 #. type: Plain text
322 #. #-#-#-#-# fedora-rawhide: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
323 #. Reconfirmed that the following error occurs on Linux 5.0 by
324 #. specifying 'new_root' as "/rootfs" and 'put_old' as
325 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
326 #. itself. Of course, this is an odd situation, since a later check
327 #. in the kernel code will in any case yield EINVAL if 'new_root' is
328 #. not a mount point. However, when the system call was first added,
329 #. 'new_root' was not required to be a mount point. So, this
330 #. error is nowadays probably just the result of crufty accumulation.
331 #. This error can also occur if we bind mount "/" on top of itself
332 #. and try to specify "/" as the 'new' (again, an odd situation). So,
333 #. the EBUSY check in the kernel does still seem necessary to prevent
334 #. that case. Furthermore, the "or put_old" piece is probably
335 #. redundant text (although the check is in the kernel), since,
336 #. in another check, 'put_old' is required to be under 'new_root'.
337 #. type: Plain text
338 #. #-#-#-#-# mageia-cauldron: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
339 #. Reconfirmed that the following error occurs on Linux 5.0 by
340 #. specifying 'new_root' as "/rootfs" and 'put_old' as
341 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
342 #. itself. Of course, this is an odd situation, since a later check
343 #. in the kernel code will in any case yield EINVAL if 'new_root' is
344 #. not a mount point. However, when the system call was first added,
345 #. 'new_root' was not required to be a mount point. So, this
346 #. error is nowadays probably just the result of crufty accumulation.
347 #. This error can also occur if we bind mount "/" on top of itself
348 #. and try to specify "/" as the 'new' (again, an odd situation). So,
349 #. the EBUSY check in the kernel does still seem necessary to prevent
350 #. that case. Furthermore, the "or put_old" piece is probably
351 #. redundant text (although the check is in the kernel), since,
352 #. in another check, 'put_old' is required to be under 'new_root'.
353 #. type: Plain text
354 #. #-#-#-#-# opensuse-leap-16-1: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
355 #. Reconfirmed that the following error occurs on Linux 5.0 by
356 #. specifying 'new_root' as "/rootfs" and 'put_old' as
357 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
358 #. itself. Of course, this is an odd situation, since a later check
359 #. in the kernel code will in any case yield EINVAL if 'new_root' is
360 #. not a mount point. However, when the system call was first added,
361 #. 'new_root' was not required to be a mount point. So, this
362 #. error is nowadays probably just the result of crufty accumulation.
363 #. This error can also occur if we bind mount "/" on top of itself
364 #. and try to specify "/" as the 'new' (again, an odd situation). So,
365 #. the EBUSY check in the kernel does still seem necessary to prevent
366 #. that case. Furthermore, the "or put_old" piece is probably
367 #. redundant text (although the check is in the kernel), since,
368 #. in another check, 'put_old' is required to be under 'new_root'.
369 #. type: Plain text
370 #. #-#-#-#-# opensuse-tumbleweed: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
371 #. Reconfirmed that the following error occurs on Linux 5.0 by
372 #. specifying 'new_root' as "/rootfs" and 'put_old' as
373 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
374 #. itself. Of course, this is an odd situation, since a later check
375 #. in the kernel code will in any case yield EINVAL if 'new_root' is
376 #. not a mount point. However, when the system call was first added,
377 #. 'new_root' was not required to be a mount point. So, this
378 #. error is nowadays probably just the result of crufty accumulation.
379 #. This error can also occur if we bind mount "/" on top of itself
380 #. and try to specify "/" as the 'new' (again, an odd situation). So,
381 #. the EBUSY check in the kernel does still seem necessary to prevent
382 #. that case. Furthermore, the "or put_old" piece is probably
383 #. redundant text (although the check is in the kernel), since,
384 #. in another check, 'put_old' is required to be under 'new_root'.
385 #. type: Plain text
386 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
387 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
388 #, fuzzy
389 #| msgid ""
390 #| "I<new_root> or I<put_old> are on the current root file system, or a file "
391 #| "system is already mounted on I<put_old>."
392 msgid ""
393 "I<new_root> or I<put_old> is on the current root mount. (This error covers "
394 "the pathological case where I<new_root> is I<\\[dq]/\\[dq]>.)"
395 msgstr ""
396 "I<new_root> ou I<put_old> : está no sistema de arquivo de raiz atual, ou um "
397 "sistema de arquivos já está montado em I<put_old>."
398
399 #. type: TP
400 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
401 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
402 #, no-wrap
403 msgid "B<EINVAL>"
404 msgstr "B<EINVAL>"
405
406 #. type: Plain text
407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
409 #, fuzzy
410 #| msgid "I<new_root> or I<put_old> is not a directory."
411 msgid "I<new_root> is not a mount point."
412 msgstr "I<new_root> ou I<put_old> não é um diretório."
413
414 #. type: Plain text
415 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
416 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
417 #, fuzzy
418 #| msgid "I<put_old> is not underneath I<new_root>."
419 msgid "I<put_old> is not at or underneath I<new_root>."
420 msgstr "I<put_old> não está abaixo de I<new_root>."
421
422 #. type: Plain text
423 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
424 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
425 msgid ""
426 "The current root directory is not a mount point (because of an earlier "
427 "B<chroot>(2))."
428 msgstr ""
429
430 #. type: Plain text
431 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
432 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
433 msgid "The current root is on the rootfs (initial ramfs) mount; see NOTES."
434 msgstr ""
435
436 #. type: Plain text
437 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
438 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
439 msgid ""
440 "Either the mount point at I<new_root>, or the parent mount of that mount "
441 "point, has propagation type B<MS_SHARED>."
442 msgstr ""
443
444 #. type: Plain text
445 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
446 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
447 msgid "I<put_old> is a mount point and has the propagation type B<MS_SHARED>."
448 msgstr ""
449
450 #. type: TP
451 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
452 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
453 #, no-wrap
454 msgid "B<ENOTDIR>"
455 msgstr "B<ENOTDIR>"
456
457 #. type: Plain text
458 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
459 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
460 msgid "I<new_root> or I<put_old> is not a directory."
461 msgstr "I<new_root> ou I<put_old> não é um diretório."
462
463 #. type: TP
464 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
465 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
466 #, no-wrap
467 msgid "B<EPERM>"
468 msgstr "B<EPERM>"
469
470 #. type: Plain text
471 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
472 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
473 #, fuzzy
474 #| msgid "The current process does not have the administrator capability."
475 msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability."
476 msgstr "A processo atual não tem habilidades de administrador."
477
478 #. type: SH
479 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
480 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
481 #, no-wrap
482 msgid "STANDARDS"
483 msgstr "PADRÕES"
484
485 #. type: Plain text
486 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
487 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
488 msgid "Linux."
489 msgstr "Linux."
490
491 #. type: SH
492 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
493 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
494 #, no-wrap
495 msgid "HISTORY"
496 msgstr "HISTÓRICO"
497
498 #. type: Plain text
499 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
500 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
501 #, fuzzy
502 #| msgid "util-linux 2.37.4"
503 msgid "Linux 2.3.41."
504 msgstr "util-linux 2.37.4"
505
506 #. type: SH
507 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
508 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
509 #, no-wrap
510 msgid "NOTES"
511 msgstr "NOTAS"
512
513 #. type: Plain text
514 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
515 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
516 msgid ""
517 "A command-line interface for this system call is provided by "
518 "B<pivot_root>(8)."
519 msgstr ""
520
521 #. type: Plain text
522 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
523 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
524 msgid ""
525 "B<pivot_root>() allows the caller to switch to a new root filesystem while "
526 "at the same time placing the old root mount at a location under I<new_root> "
527 "from where it can subsequently be unmounted. (The fact that it moves all "
528 "processes that have a root directory or current working directory on the old "
529 "root directory to the new root frees the old root directory of users, "
530 "allowing the old root mount to be unmounted more easily.)"
531 msgstr ""
532
533 #. type: Plain text
534 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
535 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
536 #, fuzzy
537 #| msgid ""
538 #| "The typical use of B<pivot_root> is during system startup, when the "
539 #| "system mounts a temporary root file system (e.g. an B<initrd>), then "
540 #| "mounts the real root file system, and eventually turns the latter into "
541 #| "the current root of all relevant processes or threads."
542 msgid ""
543 "One use of B<pivot_root>() is during system startup, when the system mounts "
544 "a temporary root filesystem (e.g., an B<initrd>(4)), then mounts the real "
545 "root filesystem, and eventually turns the latter into the root directory of "
546 "all relevant processes and threads. A modern use is to set up a root "
547 "filesystem during the creation of a container."
548 msgstr ""
549 "O uso típico de B<pivot_root> é durante a carga do sistema, quando o sistema "
550 "monta um sistema de arquivos raiz temporário (isto é, um B<initrd>), então "
551 "monta o sistema real, e eventualmente faz do mais recente a raiz atual de "
552 "todas as 'threads' ou processos relevantes."
553
554 #. type: Plain text
555 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
556 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
557 msgid ""
558 "The fact that B<pivot_root>() modifies process root and current working "
559 "directories in the manner noted in DESCRIPTION is necessary in order to "
560 "prevent kernel threads from keeping the old root mount busy with their root "
561 "and current working directories, even if they never access the filesystem in "
562 "any way."
563 msgstr ""
564
565 #. type: Plain text
566 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
567 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
568 msgid ""
569 "The rootfs (initial ramfs) cannot be B<pivot_root>()ed. The recommended "
570 "method of changing the root filesystem in this case is to delete everything "
571 "in rootfs, overmount rootfs with the new root, attach I<stdin>/I<stdout>/"
572 "I<stderr> to the new I</dev/console>, and exec the new B<init>(1). Helper "
573 "programs for this process exist; see B<switch_root>(8)."
574 msgstr ""
575
576 #. type: SS
577 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
578 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
579 #, no-wrap
580 msgid "pivot_root(\\[dq].\\[dq], \\[dq].\\[dq])"
581 msgstr ""
582
583 #. type: Plain text
584 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
585 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
586 msgid ""
587 "I<new_root> and I<put_old> may be the same directory. In particular, the "
588 "following sequence allows a pivot-root operation without needing to create "
589 "and remove a temporary directory:"
590 msgstr ""
591
592 #. type: Plain text
593 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
594 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
595 #, no-wrap
596 msgid ""
597 "chdir(new_root);\n"
598 "pivot_root(\".\", \".\");\n"
599 "umount2(\".\", MNT_DETACH);\n"
600 msgstr ""
601 "chdir(new_root);\n"
602 "pivot_root(\".\", \".\");\n"
603 "umount2(\".\", MNT_DETACH);\n"
604
605 #. type: Plain text
606 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
607 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
608 msgid ""
609 "This sequence succeeds because the B<pivot_root>() call stacks the old root "
610 "mount point on top of the new root mount point at I</>. At that point, the "
611 "calling process's root directory and current working directory refer to the "
612 "new root mount point (I<new_root>). During the subsequent B<umount>() "
613 "call, resolution of I<\\[dq].\\[dq]> starts with I<new_root> and then moves "
614 "up the list of mounts stacked at I</>, with the result that old root mount "
615 "point is unmounted."
616 msgstr ""
617
618 #. type: SS
619 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
620 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
621 #, no-wrap
622 msgid "Historical notes"
623 msgstr ""
624
625 #. type: Plain text
626 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
627 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
628 msgid "For many years, this manual page carried the following text:"
629 msgstr ""
630
631 #. type: Plain text
632 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
633 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
634 #, fuzzy
635 #| msgid ""
636 #| "B<pivot_root> may or may not change the current root and the current "
637 #| "working directory (cwd) of any processes or threads which use the old "
638 #| "root directory. The caller of B<pivot_root> must ensure that processes "
639 #| "with root or cwd at the old root operate correctly in either case. An "
640 #| "easy way to ensure this is to change their root and cwd to I<new_root> "
641 #| "before invoking B<pivot_root>."
642 msgid ""
643 "B<pivot_root>() may or may not change the current root and the current "
644 "working directory of any processes or threads which use the old root "
645 "directory. The caller of B<pivot_root>() must ensure that processes with "
646 "root or current working directory at the old root operate correctly in "
647 "either case. An easy way to ensure this is to change their root and current "
648 "working directory to I<new_root> before invoking B<pivot_root>()."
649 msgstr ""
650 "B<pivot_root> pode ou não alterar a raiz e o diretório de trabalho (cwd) "
651 "atuais de alguns processos ou 'threads' os quais usam o velho diretório "
652 "raiz. O solicitante de B<pivot_root> tem que assegurar que processos com "
653 "raiz ou cwd na velha raiz operem corretamente em qualquer caso. Um maneira "
654 "fácil para assegurar isto é alterar a raiz e cwd para I<new_root> antes de "
655 "chamar B<pivot_root>."
656
657 #. type: Plain text
658 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
659 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
660 msgid ""
661 "This text, written before the system call implementation was even finalized "
662 "in the kernel, was probably intended to warn users at that time that the "
663 "implementation might change before final release. However, the behavior "
664 "stated in DESCRIPTION has remained consistent since this system call was "
665 "first implemented and will not change now."
666 msgstr ""
667
668 #. type: SH
669 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
670 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
671 #, no-wrap
672 msgid "EXAMPLES"
673 msgstr "EXEMPLOS"
674
675 #. FIXME
676 #. Would it be better, because simpler, to use unshare(2)
677 #. rather than clone(2) in the example below?
678 #. type: Plain text
679 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
680 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
681 msgid ""
682 "The program below demonstrates the use of B<pivot_root>() inside a mount "
683 "namespace that is created using B<clone>(2). After pivoting to the root "
684 "directory named in the program's first command-line argument, the child "
685 "created by B<clone>(2) then executes the program named in the remaining "
686 "command-line arguments."
687 msgstr ""
688
689 #. type: Plain text
690 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
691 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
692 msgid ""
693 "We demonstrate the program by creating a directory that will serve as the "
694 "new root filesystem and placing a copy of the (statically linked) "
695 "B<busybox>(1) executable in that directory."
696 msgstr ""
697
698 #. type: Plain text
699 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
700 #: opensuse-tumbleweed
701 #, no-wrap
702 msgid ""
703 "$B< mkdir /tmp/rootfs>;\n"
704 "$B< ls -id /tmp/rootfs>; # Show inode number of new root directory\n"
705 "319459 /tmp/rootfs\n"
706 "$B< cp $(which busybox) /tmp/rootfs>;\n"
707 "$B< PS1=\\[aq]bbsh$ \\[aq] sudo ./pivot_root_demo /tmp/rootfs /busybox sh>;\n"
708 "bbsh$B< PATH=/>;\n"
709 "bbsh$B< busybox ln busybox ln>;\n"
710 "bbsh$B< ln busybox echo>;\n"
711 "bbsh$B< ln busybox ls>;\n"
712 "bbsh$B< ls>;\n"
713 "busybox echo ln ls\n"
714 "bbsh$B< ls -id />; # Compare with inode number above\n"
715 "319459 /\n"
716 "bbsh$B< echo \\[aq]hello world\\[aq]>;\n"
717 "hello world\n"
718 msgstr ""
719
720 #. type: SS
721 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
722 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
723 #, no-wrap
724 msgid "Program source"
725 msgstr "Fonte do programa"
726
727 #. type: Plain text
728 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
729 #: opensuse-tumbleweed
730 #, no-wrap
731 msgid ""
732 "/* pivot_root_demo.c */\n"
733 "\\&\n"
734 "#define _GNU_SOURCE\n"
735 "#include E<lt>err.hE<gt>\n"
736 "#include E<lt>limits.hE<gt>\n"
737 "#include E<lt>sched.hE<gt>\n"
738 "#include E<lt>signal.hE<gt>\n"
739 "#include E<lt>stdio.hE<gt>\n"
740 "#include E<lt>stdlib.hE<gt>\n"
741 "#include E<lt>sys/mman.hE<gt>\n"
742 "#include E<lt>sys/mount.hE<gt>\n"
743 "#include E<lt>sys/stat.hE<gt>\n"
744 "#include E<lt>sys/syscall.hE<gt>\n"
745 "#include E<lt>sys/wait.hE<gt>\n"
746 "#include E<lt>unistd.hE<gt>\n"
747 "\\&\n"
748 "static int\n"
749 "pivot_root(const char *new_root, const char *put_old)\n"
750 "{\n"
751 " return syscall(SYS_pivot_root, new_root, put_old);\n"
752 "}\n"
753 "\\&\n"
754 "#define STACK_SIZE (1024 * 1024)\n"
755 "\\&\n"
756 "static int /* Startup function for cloned child */\n"
757 "child(void *arg)\n"
758 "{\n"
759 " char path[PATH_MAX];\n"
760 " char **args = arg;\n"
761 " char *new_root = args[0];\n"
762 " const char *put_old = \"/oldrootfs\";\n"
763 "\\&\n"
764 " /* Ensure that \\[aq]new_root\\[aq] and its parent mount don\\[aq]t have\n"
765 " shared propagation (which would cause pivot_root() to\n"
766 " return an error), and prevent propagation of mount\n"
767 " events to the initial mount namespace. */\n"
768 "\\&\n"
769 " if (mount(NULL, \"/\", NULL, MS_REC | MS_PRIVATE, NULL) == -1)\n"
770 " err(EXIT_FAILURE, \"mount-MS_PRIVATE\");\n"
771 "\\&\n"
772 " /* Ensure that \\[aq]new_root\\[aq] is a mount point. */\n"
773 "\\&\n"
774 " if (mount(new_root, new_root, NULL, MS_BIND, NULL) == -1)\n"
775 " err(EXIT_FAILURE, \"mount-MS_BIND\");\n"
776 "\\&\n"
777 " /* Create directory to which old root will be pivoted. */\n"
778 "\\&\n"
779 " snprintf(path, sizeof(path), \"%s/%s\", new_root, put_old);\n"
780 " if (mkdir(path, 0777) == -1)\n"
781 " err(EXIT_FAILURE, \"mkdir\");\n"
782 "\\&\n"
783 " /* And pivot the root filesystem. */\n"
784 "\\&\n"
785 " if (pivot_root(new_root, path) == -1)\n"
786 " err(EXIT_FAILURE, \"pivot_root\");\n"
787 "\\&\n"
788 " /* Switch the current working directory to \"/\". */\n"
789 "\\&\n"
790 " if (chdir(\"/\") == -1)\n"
791 " err(EXIT_FAILURE, \"chdir\");\n"
792 "\\&\n"
793 " /* Unmount old root and remove mount point. */\n"
794 "\\&\n"
795 " if (umount2(put_old, MNT_DETACH) == -1)\n"
796 " perror(\"umount2\");\n"
797 " if (rmdir(put_old) == -1)\n"
798 " perror(\"rmdir\");\n"
799 "\\&\n"
800 " /* Execute the command specified in argv[1]... */\n"
801 "\\&\n"
802 " execv(args[1], &args[1]);\n"
803 " err(EXIT_FAILURE, \"execv\");\n"
804 "}\n"
805 "\\&\n"
806 "int\n"
807 "main(int argc, char *argv[])\n"
808 "{\n"
809 " char *stack;\n"
810 "\\&\n"
811 " /* Create a child process in a new mount namespace. */\n"
812 "\\&\n"
813 " stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,\n"
814 " MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);\n"
815 " if (stack == MAP_FAILED)\n"
816 " err(EXIT_FAILURE, \"mmap\");\n"
817 "\\&\n"
818 " if (clone(child, stack + STACK_SIZE,\n"
819 " CLONE_NEWNS | SIGCHLD, &argv[1]) == -1)\n"
820 " err(EXIT_FAILURE, \"clone\");\n"
821 "\\&\n"
822 " /* Parent falls through to here; wait for child. */\n"
823 "\\&\n"
824 " if (wait(NULL) == -1)\n"
825 " err(EXIT_FAILURE, \"wait\");\n"
826 "\\&\n"
827 " exit(EXIT_SUCCESS);\n"
828 "}\n"
829 msgstr ""
830
831 #. SRC END
832 #. type: SH
833 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
834 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
835 #, no-wrap
836 msgid "SEE ALSO"
837 msgstr "VEJA TAMBÉM"
838
839 #. type: Plain text
840 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
841 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
842 msgid ""
843 "B<chdir>(2), B<chroot>(2), B<mount>(2), B<stat>(2), B<initrd>(4), "
844 "B<mount_namespaces>(7), B<pivot_root>(8), B<switch_root>(8)"
845 msgstr ""
846 "B<chdir>(2), B<chroot>(2), B<mount>(2), B<stat>(2), B<initrd>(4), "
847 "B<mount_namespaces>(7), B<pivot_root>(8), B<switch_root>(8)"
848
849 #. type: TH
850 #: debian-trixie
851 #, no-wrap
852 msgid "2024-05-02"
853 msgstr "2 maio 2024"
854
855 #. type: TH
856 #: debian-trixie
857 #, no-wrap
858 msgid "Linux man-pages 6.9.1"
859 msgstr "Linux man-pages 6.9.1"
860
861 #. type: Plain text
862 #: debian-trixie
863 msgid "Standard C library (I<libc>, I<-lc>)"
864 msgstr "Biblioteca C Padrão (I<libc>, I<-lc>)"
865
866 #. type: Plain text
867 #: debian-trixie fedora-44 fedora-rawhide
868 msgid ""
869 "B<pivot_root>() changes the root directory and the current working "
870 "directory of each process or thread in the same mount namespace to "
871 "I<new_root> if they point to the old root directory. (See also NOTES.) On "
872 "the other hand, B<pivot_root>() does not change the caller's current "
873 "working directory (unless it is on the old root directory), and thus it "
874 "should be followed by a B<chdir(\"/\")> call."
875 msgstr ""
876
877 #. type: Plain text
878 #: debian-trixie fedora-44 fedora-rawhide
879 #, fuzzy
880 #| msgid ""
881 #| "I<put_old> must be underneath I<new_root>, i.e. adding a non-zero number "
882 #| "of B</..> to the string pointed to by I<put_old> must yield the same "
883 #| "directory as I<new_root>."
884 msgid ""
885 "I<put_old> must be at or underneath I<new_root>; that is, adding some "
886 "nonnegative number of \"I</..>\" suffixes to the pathname pointed to by "
887 "I<put_old> must yield the same directory as I<new_root>."
888 msgstr ""
889 "I<put_old> deve ser abaixo de I<new_root>, por exemplo adicionando um número "
890 "diferente de zero B</..> para a string apontada por I<put_old> deve render o "
891 "mesmo diretório como I<new_root>."
892
893 #. type: Plain text
894 #: debian-trixie fedora-44 fedora-rawhide
895 #, no-wrap
896 msgid ""
897 "$ B<mkdir /tmp/rootfs>\n"
898 "$ B<ls -id /tmp/rootfs> # Show inode number of new root directory\n"
899 "319459 /tmp/rootfs\n"
900 "$ B<cp $(which busybox) /tmp/rootfs>\n"
901 "$ B<PS1=\\[aq]bbsh$ \\[aq] sudo ./pivot_root_demo /tmp/rootfs /busybox sh>\n"
902 "bbsh$ B<PATH=/>\n"
903 "bbsh$ B<busybox ln busybox ln>\n"
904 "bbsh$ B<ln busybox echo>\n"
905 "bbsh$ B<ln busybox ls>\n"
906 "bbsh$ B<ls>\n"
907 "busybox echo ln ls\n"
908 "bbsh$ B<ls -id /> # Compare with inode number above\n"
909 "319459 /\n"
910 "bbsh$ B<echo \\[aq]hello world\\[aq]>\n"
911 "hello world\n"
912 msgstr ""
913
914 #. type: Plain text
915 #: debian-trixie fedora-44 fedora-rawhide
916 #, no-wrap
917 msgid ""
918 "/* pivot_root_demo.c */\n"
919 "\\&\n"
920 "#define _GNU_SOURCE\n"
921 "#include E<lt>err.hE<gt>\n"
922 "#include E<lt>limits.hE<gt>\n"
923 "#include E<lt>sched.hE<gt>\n"
924 "#include E<lt>signal.hE<gt>\n"
925 "#include E<lt>stdio.hE<gt>\n"
926 "#include E<lt>stdlib.hE<gt>\n"
927 "#include E<lt>sys/mman.hE<gt>\n"
928 "#include E<lt>sys/mount.hE<gt>\n"
929 "#include E<lt>sys/stat.hE<gt>\n"
930 "#include E<lt>sys/syscall.hE<gt>\n"
931 "#include E<lt>sys/wait.hE<gt>\n"
932 "#include E<lt>unistd.hE<gt>\n"
933 "\\&\n"
934 "static int\n"
935 "pivot_root(const char *new_root, const char *put_old)\n"
936 "{\n"
937 " return syscall(SYS_pivot_root, new_root, put_old);\n"
938 "}\n"
939 "\\&\n"
940 "#define STACK_SIZE (1024 * 1024)\n"
941 "\\&\n"
942 "static int /* Startup function for cloned child */\n"
943 "child(void *arg)\n"
944 "{\n"
945 " char path[PATH_MAX];\n"
946 " char **args = arg;\n"
947 " char *new_root = args[0];\n"
948 " const char *put_old = \"/oldrootfs\";\n"
949 "\\&\n"
950 " /* Ensure that \\[aq]new_root\\[aq] and its parent mount don\\[aq]t have\n"
951 " shared propagation (which would cause pivot_root() to\n"
952 " return an error), and prevent propagation of mount\n"
953 " events to the initial mount namespace. */\n"
954 "\\&\n"
955 " if (mount(NULL, \"/\", NULL, MS_REC | MS_PRIVATE, NULL) == -1)\n"
956 " err(EXIT_FAILURE, \"mount-MS_PRIVATE\");\n"
957 "\\&\n"
958 " /* Ensure that \\[aq]new_root\\[aq] is a mount point. */\n"
959 "\\&\n"
960 " if (mount(new_root, new_root, NULL, MS_BIND, NULL) == -1)\n"
961 " err(EXIT_FAILURE, \"mount-MS_BIND\");\n"
962 "\\&\n"
963 " /* Create directory to which old root will be pivoted. */\n"
964 "\\&\n"
965 " snprintf(path, sizeof(path), \"%s/%s\", new_root, put_old);\n"
966 " if (mkdir(path, 0777) == -1)\n"
967 " err(EXIT_FAILURE, \"mkdir\");\n"
968 "\\&\n"
969 " /* And pivot the root filesystem. */\n"
970 "\\&\n"
971 " if (pivot_root(new_root, path) == -1)\n"
972 " err(EXIT_FAILURE, \"pivot_root\");\n"
973 "\\&\n"
974 " /* Switch the current working directory to \"/\". */\n"
975 "\\&\n"
976 " if (chdir(\"/\") == -1)\n"
977 " err(EXIT_FAILURE, \"chdir\");\n"
978 "\\&\n"
979 " /* Unmount old root and remove mount point. */\n"
980 "\\&\n"
981 " if (umount2(put_old, MNT_DETACH) == -1)\n"
982 " perror(\"umount2\");\n"
983 " if (rmdir(put_old) == -1)\n"
984 " perror(\"rmdir\");\n"
985 "\\&\n"
986 " /* Execute the command specified in argv[1]... */\n"
987 "\\&\n"
988 " execv(args[1], &args[1]);\n"
989 " err(EXIT_FAILURE, \"execv\");\n"
990 "}\n"
991 "\\&\n"
992 "int\n"
993 "main(int argc, char *argv[])\n"
994 "{\n"
995 " char *stack;\n"
996 "\\&\n"
997 " /* Create a child process in a new mount namespace. */\n"
998 "\\&\n"
999 " stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,\n"
1000 " MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);\n"
1001 " if (stack == MAP_FAILED)\n"
1002 " err(EXIT_FAILURE, \"mmap\");\n"
1003 "\\&\n"
1004 " if (clone(child, stack + STACK_SIZE,\n"
1005 " CLONE_NEWNS | SIGCHLD, &argv[1]) == -1)\n"
1006 " err(EXIT_FAILURE, \"clone\");\n"
1007 "\\&\n"
1008 " /* Parent falls through to here; wait for child. */\n"
1009 "\\&\n"
1010 " if (wait(NULL) == -1)\n"
1011 " err(EXIT_FAILURE, \"wait\");\n"
1012 "\\&\n"
1013 " exit(EXIT_SUCCESS);\n"
1014 "}\n"
1015 msgstr ""
1016
1017 #. type: TH
1018 #: fedora-44 fedora-rawhide
1019 #, no-wrap
1020 msgid "2024-07-23"
1021 msgstr "23 julho 2024"
1022
1023 #. type: TH
1024 #: fedora-44 fedora-rawhide
1025 #, no-wrap
1026 msgid "Linux man-pages 6.13"
1027 msgstr "Linux man-pages 6.13"
1028
1029 #. type: TH
1030 #: mageia-cauldron
1031 #, no-wrap
1032 msgid "Linux man-pages 6.17"
1033 msgstr "Linux man-pages 6.17"
1034
1035 #. type: TH
1036 #: opensuse-leap-16-1 opensuse-tumbleweed
1037 #, no-wrap
1038 msgid "Linux man-pages (unreleased)"
1039 msgstr "Linux man-pages (não lançado)"