Debian Codegraph @

po/es/man2/pivot_root.2.po

raw
1 # Spanish translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Gerardo Aburruzaga García <[email protected]>, 1998.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n\n"
8 "POT-Creation-Date: 2026-06-05 06:35+0200\n"
9 "PO-Revision-Date: 1998-01-13 19:53+0200\n"
10 "Last-Translator: Gerardo Aburruzaga García <[email protected]>\n"
11 "Language-Team: Spanish <[email protected]>\n"
12 "Language: es\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17 "X-Generator: Lokalize 20.04.1\n"
18
19 #. type: TH
20 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
21 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
22 #, fuzzy, no-wrap
23 #| msgid "pivot_root(\".\", \".\")"
24 msgid "pivot_root"
25 msgstr "pivot_root(\".\", \".\")"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8 Febrero 2026"
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, fuzzy, no-wrap
37 #| msgid "Linux man-pages 6.17"
38 msgid "Linux man-pages 6.18"
39 msgstr "Páginas de Manual de Linux 6.17"
40
41 #. type: SH
42 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
43 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
44 #, no-wrap
45 msgid "NAME"
46 msgstr "NOMBRE"
47
48 #. type: Plain text
49 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
50 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
51 #, fuzzy
52 #| msgid "pivot_root - change the root file system"
53 msgid "pivot_root - change the root mount"
54 msgstr "pivot_root - cambia el sistema de ficheros raíz"
55
56 #. type: SH
57 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
58 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
59 #, no-wrap
60 msgid "LIBRARY"
61 msgstr "BIBLIOTECA"
62
63 #. type: Plain text
64 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
65 #: opensuse-leap-16-1 opensuse-tumbleweed
66 msgid "Standard C library (I<libc>,\\ I<-lc>)"
67 msgstr "Biblioteca Estándar C (I<libc>,\\ I<-lc>)"
68
69 #. type: SH
70 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
71 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
72 #, no-wrap
73 msgid "SYNOPSIS"
74 msgstr "SINOPSIS"
75
76 #. type: Plain text
77 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
78 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
79 #, no-wrap
80 msgid ""
81 "B<#include E<lt>sys/syscall.hE<gt>> /* Definition of B<SYS_*> constants */\n"
82 "B<#include E<lt>unistd.hE<gt>>\n"
83 msgstr ""
84 "B<#include E<lt>sys/syscall.hE<gt>> /* Definición de las constantes B<SYS_*> */\n"
85 "B<#include E<lt>unistd.hE<gt>>\n"
86
87 #. type: Plain text
88 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
89 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
90 #, fuzzy, no-wrap
91 #| msgid "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
92 msgid "B<int syscall(SYS_pivot_root, const char *>I<new_root>B<, const char *>I<put_old>B<);>\n"
93 msgstr "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
97 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
98 msgid ""
99 "I<Note>: glibc provides no wrapper for B<pivot_root>(), necessitating the "
100 "use of B<syscall>(2)."
101 msgstr ""
102
103 #. type: SH
104 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
105 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
106 #, no-wrap
107 msgid "DESCRIPTION"
108 msgstr "DESCRIPCIÓN"
109
110 #. type: Plain text
111 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
112 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
113 msgid ""
114 "B<pivot_root>() changes the root mount in the mount namespace of the "
115 "calling process. More precisely, it moves the root mount to the directory "
116 "I<put_old> and makes I<new_root> the new root mount. The calling process "
117 "must have the B<CAP_SYS_ADMIN> capability in the user namespace that owns "
118 "the caller's mount namespace."
119 msgstr ""
120
121 #. type: Plain text
122 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
123 #: opensuse-tumbleweed
124 msgid ""
125 "B<pivot_root>() changes the root directory and the current working "
126 "directory of each process or thread in the same mount namespace to "
127 "I<new_root> if they point to the old root directory. (See also NOTES.) On "
128 "the other hand, B<pivot_root>() does not change the caller's current "
129 "working directory (unless it is on the old root directory), and thus it "
130 "should be followed by a I<chdir(\"/\")> call."
131 msgstr ""
132
133 #. type: Plain text
134 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
135 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
136 #, fuzzy
137 #| msgid "The following restrictions apply to I<new_root> and I<put_old>:"
138 msgid "The following restrictions apply:"
139 msgstr "Las siguientes restricciones se aplican a I<new_root> y I<put_old>"
140
141 #. type: IP
142 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
143 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
144 #, no-wrap
145 msgid "\\[bu]"
146 msgstr "\\[bu]"
147
148 #. type: Plain text
149 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
150 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
151 #, fuzzy
152 #| msgid "I<new_root> or I<put_old> is not a directory."
153 msgid "I<new_root> and I<put_old> must be directories."
154 msgstr "I<new_root> o I<put_old> no es un directorio."
155
156 #. type: Plain text
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 #, fuzzy
160 #| msgid ""
161 #| "I<new_root> and I<put_old> must not be on the same file system as the "
162 #| "current root."
163 msgid ""
164 "I<new_root> and I<put_old> must not be on the same mount as the current root."
165 msgstr ""
166 "I<new_root> y I<put_old> no deben estar en el mismo sistema de ficheros que "
167 "el directorio raíz actual."
168
169 #. type: Plain text
170 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
171 #: opensuse-tumbleweed
172 #, fuzzy
173 #| msgid ""
174 #| "I<put_old> must be underneath I<new_root>, i.e. adding a non-zero number "
175 #| "of B</..> to the string pointed to by I<put_old> must yield the same "
176 #| "directory as I<new_root>."
177 msgid ""
178 "I<put_old> must be at or underneath I<new_root>; that is, adding some "
179 "nonnegative number of \\[dq]I</..\\&>\\[dq] suffixes to the pathname pointed "
180 "to by I<put_old> must yield the same directory as I<new_root>."
181 msgstr ""
182 "I<put_old> debe estar debajo de I<new_root>, es decir, añadir un número "
183 "distinto de cero de B</..> a la cadena apuntada por I<put_old> debe resultar "
184 "el mismo directorio que I<new_root>."
185
186 #. type: Plain text
187 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
188 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
189 msgid ""
190 "I<new_root> must be a path to a mount point, but can't be I<\\[dq]/\\[dq]>. "
191 "A path that is not already a mount point can be converted into one by bind "
192 "mounting the path onto itself."
193 msgstr ""
194
195 #. type: Plain text
196 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
197 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
198 msgid ""
199 "The propagation type of the parent mount of I<new_root> and the parent mount "
200 "of the current root directory must not be B<MS_SHARED>; similarly, if "
201 "I<put_old> is an existing mount point, its propagation type must not be "
202 "B<MS_SHARED>. These restrictions ensure that B<pivot_root>() never "
203 "propagates any changes to another mount namespace."
204 msgstr ""
205
206 #. type: Plain text
207 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
208 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
209 msgid "The current root directory must be a mount point."
210 msgstr ""
211
212 #. type: SH
213 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
214 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
215 #, no-wrap
216 msgid "RETURN VALUE"
217 msgstr "VALOR DEVUELTO"
218
219 #. type: Plain text
220 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
221 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
222 msgid ""
223 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
224 "to indicate the error."
225 msgstr ""
226 "En caso de éxito se devuelve cero. En caso de error se devuelve -1, y "
227 "I<errno> se configura para indicar el error."
228
229 #. type: SH
230 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
231 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
232 #, no-wrap
233 msgid "ERRORS"
234 msgstr "ERRORES"
235
236 #. type: Plain text
237 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
238 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
239 #, fuzzy
240 #| msgid ""
241 #| "B<pivot_root> may return (in I<errno>) any of the errors returned by "
242 #| "B<stat(2)>. Additionally, it may return:"
243 msgid ""
244 "B<pivot_root>() may fail with any of the same errors as B<stat>(2). "
245 "Additionally, it may fail with the following errors:"
246 msgstr ""
247 "B<pivot_root> puede devolver (en I<errno>) cualquierda de los errores "
248 "devueltos por B<stat(2)>. Adicionalmente, puede devolver:"
249
250 #. type: TP
251 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
252 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
253 #, no-wrap
254 msgid "B<EBUSY>"
255 msgstr "B<EBUSY>"
256
257 #. #-#-#-#-# archlinux: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
258 #. Reconfirmed that the following error occurs on Linux 5.0 by
259 #. specifying 'new_root' as "/rootfs" and 'put_old' as
260 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
261 #. itself. Of course, this is an odd situation, since a later check
262 #. in the kernel code will in any case yield EINVAL if 'new_root' is
263 #. not a mount point. However, when the system call was first added,
264 #. 'new_root' was not required to be a mount point. So, this
265 #. error is nowadays probably just the result of crufty accumulation.
266 #. This error can also occur if we bind mount "/" on top of itself
267 #. and try to specify "/" as the 'new' (again, an odd situation). So,
268 #. the EBUSY check in the kernel does still seem necessary to prevent
269 #. that case. Furthermore, the "or put_old" piece is probably
270 #. redundant text (although the check is in the kernel), since,
271 #. in another check, 'put_old' is required to be under 'new_root'.
272 #. type: Plain text
273 #. #-#-#-#-# debian-trixie: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
274 #. Reconfirmed that the following error occurs on Linux 5.0 by
275 #. specifying 'new_root' as "/rootfs" and 'put_old' as
276 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
277 #. itself. Of course, this is an odd situation, since a later check
278 #. in the kernel code will in any case yield EINVAL if 'new_root' is
279 #. not a mount point. However, when the system call was first added,
280 #. 'new_root' was not required to be a mount point. So, this
281 #. error is nowadays probably just the result of crufty accumulation.
282 #. This error can also occur if we bind mount "/" on top of itself
283 #. and try to specify "/" as the 'new' (again, an odd situation). So,
284 #. the EBUSY check in the kernel does still seem necessary to prevent
285 #. that case. Furthermore, the "or put_old" piece is probably
286 #. redundant text (although the check is in the kernel), since,
287 #. in another check, 'put_old' is required to be under 'new_root'.
288 #. type: Plain text
289 #. #-#-#-#-# debian-unstable: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
290 #. Reconfirmed that the following error occurs on Linux 5.0 by
291 #. specifying 'new_root' as "/rootfs" and 'put_old' as
292 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
293 #. itself. Of course, this is an odd situation, since a later check
294 #. in the kernel code will in any case yield EINVAL if 'new_root' is
295 #. not a mount point. However, when the system call was first added,
296 #. 'new_root' was not required to be a mount point. So, this
297 #. error is nowadays probably just the result of crufty accumulation.
298 #. This error can also occur if we bind mount "/" on top of itself
299 #. and try to specify "/" as the 'new' (again, an odd situation). So,
300 #. the EBUSY check in the kernel does still seem necessary to prevent
301 #. that case. Furthermore, the "or put_old" piece is probably
302 #. redundant text (although the check is in the kernel), since,
303 #. in another check, 'put_old' is required to be under 'new_root'.
304 #. type: Plain text
305 #. #-#-#-#-# fedora-44: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
306 #. Reconfirmed that the following error occurs on Linux 5.0 by
307 #. specifying 'new_root' as "/rootfs" and 'put_old' as
308 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
309 #. itself. Of course, this is an odd situation, since a later check
310 #. in the kernel code will in any case yield EINVAL if 'new_root' is
311 #. not a mount point. However, when the system call was first added,
312 #. 'new_root' was not required to be a mount point. So, this
313 #. error is nowadays probably just the result of crufty accumulation.
314 #. This error can also occur if we bind mount "/" on top of itself
315 #. and try to specify "/" as the 'new' (again, an odd situation). So,
316 #. the EBUSY check in the kernel does still seem necessary to prevent
317 #. that case. Furthermore, the "or put_old" piece is probably
318 #. redundant text (although the check is in the kernel), since,
319 #. in another check, 'put_old' is required to be under 'new_root'.
320 #. type: Plain text
321 #. #-#-#-#-# fedora-rawhide: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
322 #. Reconfirmed that the following error occurs on Linux 5.0 by
323 #. specifying 'new_root' as "/rootfs" and 'put_old' as
324 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
325 #. itself. Of course, this is an odd situation, since a later check
326 #. in the kernel code will in any case yield EINVAL if 'new_root' is
327 #. not a mount point. However, when the system call was first added,
328 #. 'new_root' was not required to be a mount point. So, this
329 #. error is nowadays probably just the result of crufty accumulation.
330 #. This error can also occur if we bind mount "/" on top of itself
331 #. and try to specify "/" as the 'new' (again, an odd situation). So,
332 #. the EBUSY check in the kernel does still seem necessary to prevent
333 #. that case. Furthermore, the "or put_old" piece is probably
334 #. redundant text (although the check is in the kernel), since,
335 #. in another check, 'put_old' is required to be under 'new_root'.
336 #. type: Plain text
337 #. #-#-#-#-# mageia-cauldron: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
338 #. Reconfirmed that the following error occurs on Linux 5.0 by
339 #. specifying 'new_root' as "/rootfs" and 'put_old' as
340 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
341 #. itself. Of course, this is an odd situation, since a later check
342 #. in the kernel code will in any case yield EINVAL if 'new_root' is
343 #. not a mount point. However, when the system call was first added,
344 #. 'new_root' was not required to be a mount point. So, this
345 #. error is nowadays probably just the result of crufty accumulation.
346 #. This error can also occur if we bind mount "/" on top of itself
347 #. and try to specify "/" as the 'new' (again, an odd situation). So,
348 #. the EBUSY check in the kernel does still seem necessary to prevent
349 #. that case. Furthermore, the "or put_old" piece is probably
350 #. redundant text (although the check is in the kernel), since,
351 #. in another check, 'put_old' is required to be under 'new_root'.
352 #. type: Plain text
353 #. #-#-#-#-# opensuse-leap-16-1: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
354 #. Reconfirmed that the following error occurs on Linux 5.0 by
355 #. specifying 'new_root' as "/rootfs" and 'put_old' as
356 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
357 #. itself. Of course, this is an odd situation, since a later check
358 #. in the kernel code will in any case yield EINVAL if 'new_root' is
359 #. not a mount point. However, when the system call was first added,
360 #. 'new_root' was not required to be a mount point. So, this
361 #. error is nowadays probably just the result of crufty accumulation.
362 #. This error can also occur if we bind mount "/" on top of itself
363 #. and try to specify "/" as the 'new' (again, an odd situation). So,
364 #. the EBUSY check in the kernel does still seem necessary to prevent
365 #. that case. Furthermore, the "or put_old" piece is probably
366 #. redundant text (although the check is in the kernel), since,
367 #. in another check, 'put_old' is required to be under 'new_root'.
368 #. type: Plain text
369 #. #-#-#-#-# opensuse-tumbleweed: pivot_root.2.pot (PACKAGE VERSION) #-#-#-#-#
370 #. Reconfirmed that the following error occurs on Linux 5.0 by
371 #. specifying 'new_root' as "/rootfs" and 'put_old' as
372 #. "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
373 #. itself. Of course, this is an odd situation, since a later check
374 #. in the kernel code will in any case yield EINVAL if 'new_root' is
375 #. not a mount point. However, when the system call was first added,
376 #. 'new_root' was not required to be a mount point. So, this
377 #. error is nowadays probably just the result of crufty accumulation.
378 #. This error can also occur if we bind mount "/" on top of itself
379 #. and try to specify "/" as the 'new' (again, an odd situation). So,
380 #. the EBUSY check in the kernel does still seem necessary to prevent
381 #. that case. Furthermore, the "or put_old" piece is probably
382 #. redundant text (although the check is in the kernel), since,
383 #. in another check, 'put_old' is required to be under 'new_root'.
384 #. type: Plain text
385 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
386 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
387 #, fuzzy
388 #| msgid ""
389 #| "I<new_root> or I<put_old> are on the current root file system, or a file "
390 #| "system is already mounted on I<put_old>."
391 msgid ""
392 "I<new_root> or I<put_old> is on the current root mount. (This error covers "
393 "the pathological case where I<new_root> is I<\\[dq]/\\[dq]>.)"
394 msgstr ""
395 "I<new_root> o I<put_old> están en el sistema de ficheros raíz actual, o ya "
396 "hay un sistema de ficheros montado en I<put_old>."
397
398 #. type: TP
399 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
400 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
401 #, no-wrap
402 msgid "B<EINVAL>"
403 msgstr "B<EINVAL>"
404
405 #. type: Plain text
406 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
407 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
408 #, fuzzy
409 #| msgid "I<new_root> or I<put_old> is not a directory."
410 msgid "I<new_root> is not a mount point."
411 msgstr "I<new_root> o I<put_old> no es un directorio."
412
413 #. type: Plain text
414 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
415 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
416 #, fuzzy
417 #| msgid "I<put_old> is not underneath I<new_root>."
418 msgid "I<put_old> is not at or underneath I<new_root>."
419 msgstr "I<put_old> no está debajo de I<new_root>."
420
421 #. type: Plain text
422 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
423 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
424 msgid ""
425 "The current root directory is not a mount point (because of an earlier "
426 "B<chroot>(2))."
427 msgstr ""
428
429 #. type: Plain text
430 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
431 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
432 msgid "The current root is on the rootfs (initial ramfs) mount; see NOTES."
433 msgstr ""
434
435 #. type: Plain text
436 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
437 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
438 msgid ""
439 "Either the mount point at I<new_root>, or the parent mount of that mount "
440 "point, has propagation type B<MS_SHARED>."
441 msgstr ""
442
443 #. type: Plain text
444 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
445 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
446 msgid "I<put_old> is a mount point and has the propagation type B<MS_SHARED>."
447 msgstr ""
448
449 #. type: TP
450 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
451 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
452 #, no-wrap
453 msgid "B<ENOTDIR>"
454 msgstr "B<ENOTDIR>"
455
456 #. type: Plain text
457 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
458 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
459 msgid "I<new_root> or I<put_old> is not a directory."
460 msgstr "I<new_root> o I<put_old> no es un directorio."
461
462 #. type: TP
463 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
464 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
465 #, no-wrap
466 msgid "B<EPERM>"
467 msgstr "B<EPERM>"
468
469 #. type: Plain text
470 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
471 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
472 #, fuzzy
473 #| msgid "The current process does not have the administrator capability."
474 msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability."
475 msgstr "El proceso actual no tiene la capacidad de administrador."
476
477 #. type: SH
478 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
479 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
480 #, no-wrap
481 msgid "STANDARDS"
482 msgstr "ESTÁNDARES"
483
484 #. type: Plain text
485 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
486 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
487 msgid "Linux."
488 msgstr "Linux."
489
490 #. type: SH
491 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
492 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
493 #, no-wrap
494 msgid "HISTORY"
495 msgstr "HISTORIAL"
496
497 #. type: Plain text
498 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
499 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
500 #, fuzzy
501 #| msgid "util-linux 2.37.4"
502 msgid "Linux 2.3.41."
503 msgstr "util-linux 2.37.4"
504
505 #. type: SH
506 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
507 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
508 #, no-wrap
509 msgid "NOTES"
510 msgstr "NOTAS"
511
512 #. type: Plain text
513 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
514 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
515 msgid ""
516 "A command-line interface for this system call is provided by "
517 "B<pivot_root>(8)."
518 msgstr ""
519
520 #. type: Plain text
521 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
522 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
523 msgid ""
524 "B<pivot_root>() allows the caller to switch to a new root filesystem while "
525 "at the same time placing the old root mount at a location under I<new_root> "
526 "from where it can subsequently be unmounted. (The fact that it moves all "
527 "processes that have a root directory or current working directory on the old "
528 "root directory to the new root frees the old root directory of users, "
529 "allowing the old root mount to be unmounted more easily.)"
530 msgstr ""
531
532 #. type: Plain text
533 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
534 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
535 #, fuzzy
536 #| msgid ""
537 #| "The typical use of B<pivot_root> is during system startup, when the "
538 #| "system mounts a temporary root file system (e.g. an B<initrd>), then "
539 #| "mounts the real root file system, and eventually turns the latter into "
540 #| "the current root of all relevant processes or threads."
541 msgid ""
542 "One use of B<pivot_root>() is during system startup, when the system mounts "
543 "a temporary root filesystem (e.g., an B<initrd>(4)), then mounts the real "
544 "root filesystem, and eventually turns the latter into the root directory of "
545 "all relevant processes and threads. A modern use is to set up a root "
546 "filesystem during the creation of a container."
547 msgstr ""
548 "El uso habitual de B<pivot_root> es durante la puesta en marcha del sistema, "
549 "cuando el sistema monta un sistema de ficheros raíz temporal (p.e un "
550 "B<initrd>), monta el sistema de ficheros raíz real, y finalmente convierte "
551 "al último en el sistema raíz para todos los procesos o hilos importantes."
552
553 #. type: Plain text
554 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
555 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
556 msgid ""
557 "The fact that B<pivot_root>() modifies process root and current working "
558 "directories in the manner noted in DESCRIPTION is necessary in order to "
559 "prevent kernel threads from keeping the old root mount busy with their root "
560 "and current working directories, even if they never access the filesystem in "
561 "any way."
562 msgstr ""
563
564 #. type: Plain text
565 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
566 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
567 msgid ""
568 "The rootfs (initial ramfs) cannot be B<pivot_root>()ed. The recommended "
569 "method of changing the root filesystem in this case is to delete everything "
570 "in rootfs, overmount rootfs with the new root, attach I<stdin>/I<stdout>/"
571 "I<stderr> to the new I</dev/console>, and exec the new B<init>(1). Helper "
572 "programs for this process exist; see B<switch_root>(8)."
573 msgstr ""
574
575 #. type: SS
576 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
577 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
578 #, no-wrap
579 msgid "pivot_root(\\[dq].\\[dq], \\[dq].\\[dq])"
580 msgstr ""
581
582 #. type: Plain text
583 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
584 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
585 msgid ""
586 "I<new_root> and I<put_old> may be the same directory. In particular, the "
587 "following sequence allows a pivot-root operation without needing to create "
588 "and remove a temporary directory:"
589 msgstr ""
590
591 #. type: Plain text
592 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
593 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
594 #, no-wrap
595 msgid ""
596 "chdir(new_root);\n"
597 "pivot_root(\".\", \".\");\n"
598 "umount2(\".\", MNT_DETACH);\n"
599 msgstr ""
600 "chdir(new_root);\n"
601 "pivot_root(\".\", \".\");\n"
602 "umount2(\".\", MNT_DETACH);\n"
603
604 #. type: Plain text
605 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
606 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
607 msgid ""
608 "This sequence succeeds because the B<pivot_root>() call stacks the old root "
609 "mount point on top of the new root mount point at I</>. At that point, the "
610 "calling process's root directory and current working directory refer to the "
611 "new root mount point (I<new_root>). During the subsequent B<umount>() "
612 "call, resolution of I<\\[dq].\\[dq]> starts with I<new_root> and then moves "
613 "up the list of mounts stacked at I</>, with the result that old root mount "
614 "point is unmounted."
615 msgstr ""
616
617 #. type: SS
618 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
619 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
620 #, no-wrap
621 msgid "Historical notes"
622 msgstr "Notas históricas"
623
624 #. type: Plain text
625 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
626 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
627 msgid "For many years, this manual page carried the following text:"
628 msgstr ""
629
630 #. type: Plain text
631 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
632 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
633 #, fuzzy
634 #| msgid ""
635 #| "B<pivot_root> may or may not change the current root and the current "
636 #| "working directory (cwd) of any processes or threads which use the old "
637 #| "root directory. The caller of B<pivot_root> must ensure that processes "
638 #| "with root or cwd at the old root operate correctly in either case. An "
639 #| "easy way to ensure this is to change their root and cwd to I<new_root> "
640 #| "before invoking B<pivot_root>."
641 msgid ""
642 "B<pivot_root>() may or may not change the current root and the current "
643 "working directory of any processes or threads which use the old root "
644 "directory. The caller of B<pivot_root>() must ensure that processes with "
645 "root or current working directory at the old root operate correctly in "
646 "either case. An easy way to ensure this is to change their root and current "
647 "working directory to I<new_root> before invoking B<pivot_root>()."
648 msgstr ""
649 "B<pivot_root> puede o no cambiar el directorio raíz actual y el directorio "
650 "de trabajo actual (cwd) de cualquier proceso o hilo que use el directorio "
651 "raíz antiguo. El invocador de B<pivot_root> debe asegurarse de que los "
652 "procesos que tengan como directorio raíz o de trabajo actual el antiguo "
653 "directorio raíz funcionen correctamente en ambos casos. Una manera sencilla "
654 "de asegurar ésto es cambiar su directorio raíz y de trabajo actual a "
655 "I<new_root> antes de invocar a 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 "EJEMPLOS"
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 "Código fuente"
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 "VÉASE TAMBIÉN"
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 Mayo 2024"
854
855 #. type: TH
856 #: debian-trixie
857 #, no-wrap
858 msgid "Linux man-pages 6.9.1"
859 msgstr "Páginas de Manual de Linux 6.9.1"
860
861 #. type: Plain text
862 #: debian-trixie
863 msgid "Standard C library (I<libc>, I<-lc>)"
864 msgstr "Biblioteca Estándar C (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> debe estar debajo de I<new_root>, es decir, añadir un número "
890 "distinto de cero de B</..> a la cadena apuntada por I<put_old> debe resultar "
891 "el mismo directorio que 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 ​​Julio 2024"
1022
1023 #. type: TH
1024 #: fedora-44 fedora-rawhide
1025 #, no-wrap
1026 msgid "Linux man-pages 6.13"
1027 msgstr "Páginas de Manual de Linux 6.13"
1028
1029 #. type: TH
1030 #: mageia-cauldron
1031 #, no-wrap
1032 msgid "Linux man-pages 6.17"
1033 msgstr "Páginas de Manual de Linux 6.17"
1034
1035 #. type: TH
1036 #: opensuse-leap-16-1 opensuse-tumbleweed
1037 #, no-wrap
1038 msgid "Linux man-pages (unreleased)"
1039 msgstr "Páginas de Manual de Linux (no publicadas)"