Debian Codegraph @

po/es/man3/shm_open.3.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 # Miguel Pérez Ibars <[email protected]>, 2004.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n\n"
8 "POT-Creation-Date: 2026-06-05 06:43+0200\n"
9 "PO-Revision-Date: 2004-08-13 19:55+0200\n"
10 "Last-Translator: Miguel Pérez Ibars <[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 #, no-wrap
23 msgid "shm_open"
24 msgstr ""
25
26 #. type: TH
27 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
28 #: opensuse-tumbleweed
29 #, no-wrap
30 msgid "2026-02-08"
31 msgstr "8 Febrero 2026"
32
33 #. type: TH
34 #: archlinux debian-unstable
35 #, fuzzy, no-wrap
36 #| msgid "Linux man-pages 6.17"
37 msgid "Linux man-pages 6.18"
38 msgstr "Páginas de Manual de Linux 6.17"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "NOMBRE"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid ""
51 "shm_open, shm_unlink - create/open or unlink POSIX shared memory objects"
52 msgstr ""
53 "shm_open, shm_unlink - crea/abre o borra objetos POSIX de memoria compartida"
54
55 #. type: SH
56 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
57 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
58 #, no-wrap
59 msgid "LIBRARY"
60 msgstr "BIBLIOTECA"
61
62 #. type: Plain text
63 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
64 #: opensuse-leap-16-1 opensuse-tumbleweed
65 msgid "Real-time library (I<librt>,\\ I<-lrt>)"
66 msgstr "Librería de tiempo real (I<librt>,\\ I<-lrt>)"
67
68 #. type: SH
69 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
70 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
71 #, no-wrap
72 msgid "SYNOPSIS"
73 msgstr "SINOPSIS"
74
75 #. type: Plain text
76 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
77 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
78 #, fuzzy, no-wrap
79 #| msgid ""
80 #| "B<#include E<lt>sys/types.hE<gt>>\n"
81 #| "B<#include E<lt>sys/socket.hE<gt>>\n"
82 #| "B<#include E<lt>netdb.hE<gt>>\n"
83 msgid ""
84 "B<#include E<lt>sys/mman.hE<gt>>\n"
85 "B<#include E<lt>sys/stat.hE<gt>> /* For mode constants */\n"
86 "B<#include E<lt>fcntl.hE<gt>> /* For O_* constants */\n"
87 msgstr ""
88 "B<#include E<lt>sys/types.hE<gt>>\n"
89 "B<#include E<lt>sys/socket.hE<gt>>\n"
90 "B<#include E<lt>netdb.hE<gt>>\n"
91
92 #. type: Plain text
93 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
94 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
95 #, fuzzy, no-wrap
96 #| msgid "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
97 msgid ""
98 "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>\n"
99 "B<int shm_unlink(const char *>I<name>B<);>\n"
100 msgstr "B<int shm_open(const char *>I<name>B<, int >I<oflag>B<, mode_t >I<mode>B<);>"
101
102 #. type: SH
103 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
104 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
105 #, no-wrap
106 msgid "DESCRIPTION"
107 msgstr "DESCRIPCIÓN"
108
109 #. type: Plain text
110 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
111 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
112 msgid ""
113 "B<shm_open>() creates and opens a new, or opens an existing, POSIX shared "
114 "memory object. A POSIX shared memory object is in effect a handle which can "
115 "be used by unrelated processes to B<mmap>(2) the same region of shared "
116 "memory. The B<shm_unlink>() function performs the converse operation, "
117 "removing an object previously created by B<shm_open>()."
118 msgstr ""
119 "B<shm_open>() crea y abre un nuevo, o abre uno ya existente, objeto POSIX de "
120 "memoria compartida. Un objeto POSIX de memoria compartida es en efecto un "
121 "manejador que puede ser utilizado por procesos no relacionados para ubicar "
122 "la misma zona de memoria compartida mediante B<mmap>(2). La función "
123 "B<shm_unlink>() realiza la operación inversa, borra un objeto previamente "
124 "creado con B<shm_open>()."
125
126 #. glibc allows the initial slash to be omitted, and makes
127 #. multiple initial slashes equivalent to a single slash.
128 #. This differs from the implementation of POSIX message queues.
129 #. glibc allows subdirectory components in the name, in which
130 #. case the subdirectory must exist under /dev/shm, and allow the
131 #. required permissions if a user wants to create a shared memory
132 #. object in that subdirectory.
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 ""
138 #| "The operation of B<shm_open> is analogous to that of B<open>(2). I<name> "
139 #| "specifies the shared memory object to be created or opened. For portable "
140 #| "use, I<name> should have an initial slash (/) and contain no embedded "
141 #| "slashes."
142 msgid ""
143 "The operation of B<shm_open>() is analogous to that of B<open>(2). I<name> "
144 "specifies the shared memory object to be created or opened. For portable "
145 "use, a shared memory object should be identified by a name of the form I</"
146 "somename>; that is, a null-terminated string of up to B<NAME_MAX> (i.e., "
147 "255) characters consisting of an initial slash, followed by one or more "
148 "characters, none of which are slashes."
149 msgstr ""
150 "La operación de B<shm_open> es análoga a la de B<open>(2). I<name> "
151 "especifica el objeto de memoria compartida que se creará o abrirá. Para un "
152 "uso portable, I<name> debe comenzar con una barra (/) y no contener ninguna "
153 "barra embebida."
154
155 #. type: Plain text
156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
158 msgid ""
159 "I<oflag> is a bit mask created by ORing together exactly one of B<O_RDONLY> "
160 "or B<O_RDWR> and any of the other flags listed here:"
161 msgstr ""
162 "I<oflag> es una máscara de bits creada mediante una operación OR lógica de "
163 "sólo una de B<O_RDONLY> o B<O_RDWR> y de cualquier otra opción listada aquí:"
164
165 #. type: TP
166 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
167 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
168 #, no-wrap
169 msgid "B<O_RDONLY>"
170 msgstr "B<O_RDONLY>"
171
172 #. type: Plain text
173 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
174 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
175 msgid ""
176 "Open the object for read access. A shared memory object opened in this way "
177 "can be B<mmap>(2)ed only for read (B<PROT_READ>) access."
178 msgstr ""
179 "Abre el objeto para lectura. Un objeto de memoria compartida abierto de "
180 "esta manera sólo puede ser ubicado con B<mmap>(2) para acceso de lectura "
181 "(B<PROT_READ>)."
182
183 #. type: TP
184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
186 #, no-wrap
187 msgid "B<O_RDWR>"
188 msgstr "B<O_RDWR>"
189
190 #. type: Plain text
191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
193 msgid "Open the object for read-write access."
194 msgstr "Abre el objeto para lectura-escritura."
195
196 #. type: TP
197 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
198 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
199 #, no-wrap
200 msgid "B<O_CREAT>"
201 msgstr "B<O_CREAT>"
202
203 #. In truth it is actually the filesystem IDs on Linux, but these
204 #. are nearly always the same as the effective IDs. (MTK, Jul 05)
205 #. type: Plain text
206 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
207 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
208 #, fuzzy
209 #| msgid ""
210 #| "Create the shared memory object if it does not exist. The user and group "
211 #| "ownership of the object are set as for B<open>(2), and the object's "
212 #| "permission bits are set according to the low-order 9 bits of I<mode>, "
213 #| "except that those bits set in the process file mode creation mask (see "
214 #| "B<umask>(2)) are cleared for the new object. (A set of macro constants "
215 #| "which can be used to define I<mode> is listed in B<open>(2).)"
216 msgid ""
217 "Create the shared memory object if it does not exist. The user and group "
218 "ownership of the object are taken from the corresponding effective IDs of "
219 "the calling process, and the object's permission bits are set according to "
220 "the low-order 9 bits of I<mode>, except that those bits set in the process "
221 "file mode creation mask (see B<umask>(2)) are cleared for the new object. "
222 "A set of macro constants which can be used to define I<mode> is listed in "
223 "B<open>(2). (Symbolic definitions of these constants can be obtained by "
224 "including I<E<lt>sys/stat.hE<gt>>.)"
225 msgstr ""
226 "Crea el objeto de memoria compartida si no existe. El usuario y grupo "
227 "propietario del objeto son establecidos de igual manera que para B<open>(2), "
228 "y los bits de permisos del objeto son establecidos según los 9 bits de orden "
229 "inferior de I<mode>, salvo que aquellos bits activos en la máscara de modo "
230 "de creación de ficheros del proceso (véase B<umask>(2)) estén desactivados "
231 "para el nuevo objeto. (Una lista de macros que pueden ser utilizadas para "
232 "definir I<mode> se puede encontrar en B<open>(2).)"
233
234 #. type: Plain text
235 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
236 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
237 #, fuzzy
238 #| msgid ""
239 #| "A new shared memory object initially has zero length\\(emthe size of the "
240 #| "object can be set using B<ftruncate>(2). The newly allocated bytes of a "
241 #| "shared memory object are automatically initialized to 0."
242 msgid ""
243 "A new shared memory object initially has zero length\\[em]the size of the "
244 "object can be set using B<ftruncate>(2). The newly allocated bytes of a "
245 "shared memory object are automatically initialized to 0."
246 msgstr ""
247 "Un nuevo objeto de memoria compartida tiene longitud cero - el tamaño del "
248 "objeto puede ser modificado usando B<ftruncate>(2). (Los bytes del objeto "
249 "de memoria compartida recién creado son automáticamente inicializados a 0.)"
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<O_EXCL>"
256 msgstr "B<O_EXCL>"
257
258 #. type: Plain text
259 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
260 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
261 msgid ""
262 "If B<O_CREAT> was also specified, and a shared memory object with the given "
263 "I<name> already exists, return an error. The check for the existence of the "
264 "object, and its creation if it does not exist, are performed atomically."
265 msgstr ""
266 "Si B<O_CREAT> fue especificado también, y ya existe un objeto de memoria "
267 "compartida con el nombre dado I<name> , se devuelve un error. La "
268 "comprobación de la existencia del objeto, y su creación si no existe, se "
269 "hacen de manera atómica."
270
271 #. type: TP
272 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
273 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
274 #, no-wrap
275 msgid "B<O_TRUNC>"
276 msgstr "B<O_TRUNC>"
277
278 #. type: Plain text
279 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
280 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
281 msgid "If the shared memory object already exists, truncate it to zero bytes."
282 msgstr "Si el objeto de memoria compartida ya existe, lo trunca a cero bytes."
283
284 #. type: Plain text
285 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
286 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
287 msgid ""
288 "Definitions of these flag values can be obtained by including "
289 "I<E<lt>fcntl.hE<gt>>."
290 msgstr ""
291
292 #. type: Plain text
293 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
294 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
295 msgid ""
296 "On successful completion B<shm_open>() returns a new file descriptor "
297 "referring to the shared memory object. This file descriptor is guaranteed "
298 "to be the lowest-numbered file descriptor not previously opened within the "
299 "process. The B<FD_CLOEXEC> flag (see B<fcntl>(2)) is set for the file "
300 "descriptor."
301 msgstr ""
302 "En el caso de que B<shm_open>() se complete con éxito se devuelve un nuevo "
303 "descriptor de fichero que hace referencia al objeto de memoria compartida. "
304 "Se garantiza que este descriptor de fichero será el descriptor de fichero "
305 "con número más bajo no abierto previamente dentro del proceso. La opción "
306 "B<FD_CLOEXEC> (véase B<fcntl>(2)) es activada para el descriptor de fichero."
307
308 #. type: Plain text
309 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
310 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
311 msgid ""
312 "The file descriptor is normally used in subsequent calls to B<ftruncate>(2) "
313 "(for a newly created object) and B<mmap>(2). After a call to B<mmap>(2) "
314 "the file descriptor may be closed without affecting the memory mapping."
315 msgstr ""
316 "El descriptor de fichero se utiliza normalmente en llamadas posteriores a to "
317 "B<ftruncate>(2) (para un objeto recién creado) y B<mmap>(2). Después de "
318 "una llamada a B<mmap>(2) el descriptor de fichero puede ser cerrado sin "
319 "afectar al mapeo de memoria."
320
321 #. type: Plain text
322 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
323 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
324 #, fuzzy
325 #| msgid ""
326 #| "The operation of B<shm_unlink>() is analogous to B<unlink>(2): it "
327 #| "removes a shared memory object name, and, once all processes have "
328 #| "unmapped the object, de-allocates and destroys the contents of the "
329 #| "associated memory region. After a successful B<shm_unlink>(), attempts "
330 #| "to B<shm_open>() an object with the same I<name> fail (unless B<O_CREAT> "
331 #| "was specified, in which case a new, distinct object is created)."
332 msgid ""
333 "The operation of B<shm_unlink>() is analogous to B<unlink>(2): it removes a "
334 "shared memory object name, and, once all processes have unmapped the object, "
335 "deallocates and destroys the contents of the associated memory region. "
336 "After a successful B<shm_unlink>(), attempts to B<shm_open>() an object "
337 "with the same I<name> fail (unless B<O_CREAT> was specified, in which case a "
338 "new, distinct object is created)."
339 msgstr ""
340 "La operación de B<shm_unlink>() es análoga a la de B<unlink>(2): elimina un "
341 "nombre de objeto de memoria compartida, y, una vez que todos los procesos "
342 "han eliminado el objeto, libera y destruye el contenido de la zona de "
343 "memoria asociada. Después de una llamada exitosa a B<shm_unlink>(), los "
344 "intentos de abrir un objeto con B<shm_open>() que tengan el mismo nombre "
345 "I<name> fallarán (a menos que se especificara B<O_CREAT> , en cuyo caso se "
346 "crea un objeto distinto nuevo)."
347
348 #. type: SH
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 #, no-wrap
352 msgid "RETURN VALUE"
353 msgstr "VALOR DEVUELTO"
354
355 #. type: Plain text
356 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
357 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
358 #, fuzzy
359 #| msgid ""
360 #| "On success, B<shm_open> returns a non-negative file descriptor. On "
361 #| "failure, B<shm_open> returns -1. B<shm_unlink> returns 0 on success, or "
362 #| "-1 on error."
363 msgid ""
364 "On success, B<shm_open>() returns a file descriptor (a nonnegative "
365 "integer). On success, B<shm_unlink>() returns 0. On failure, both "
366 "functions return -1 and set I<errno> to indicate the error."
367 msgstr ""
368 "En caso de éxito, B<shm_open> devuelve un descriptor de fichero no negativo. "
369 "En caso de fallo, B<shm_open> devuelve -1. B<shm_unlink> devuelve 0 en caso "
370 "de éxito, o -1 en caso de error."
371
372 #. type: SH
373 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
374 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
375 #, no-wrap
376 msgid "ERRORS"
377 msgstr "ERRORES"
378
379 #. type: TP
380 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
381 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
382 #, no-wrap
383 msgid "B<EACCES>"
384 msgstr "B<EACCES>"
385
386 #. type: Plain text
387 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
388 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
389 msgid "Permission to B<shm_unlink>() the shared memory object was denied."
390 msgstr ""
391 "Se denegó el acceso para borrar el objeto de memoria compartida con "
392 "B<shm_unlink>()."
393
394 #. type: Plain text
395 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
396 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
397 msgid ""
398 "Permission was denied to B<shm_open>() I<name> in the specified I<mode>, or "
399 "B<O_TRUNC> was specified and the caller does not have write permission on "
400 "the object."
401 msgstr ""
402 "Se denegó el acceso a I<name> en B<shm_open>() en el modo I<mode> "
403 "especificado, o se especificó la opción B<O_TRUNC> y el invocador no tiene "
404 "permisos de escritura sobre el objeto."
405
406 #. type: TP
407 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
408 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
409 #, no-wrap
410 msgid "B<EEXIST>"
411 msgstr "B<EEXIST>"
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 msgid ""
417 "Both B<O_CREAT> and B<O_EXCL> were specified to B<shm_open>() and the "
418 "shared memory object specified by I<name> already exists."
419 msgstr ""
420 "Se especificaron las opciones B<O_CREAT> y B<O_EXCL> a la función "
421 "B<shm_open>() y el objeto de memoria compartida especificado por I<name> ya "
422 "existe."
423
424 #. type: TP
425 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
426 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
427 #, no-wrap
428 msgid "B<EINVAL>"
429 msgstr "B<EINVAL>"
430
431 #. type: Plain text
432 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
433 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
434 msgid "The I<name> argument to B<shm_open>() was invalid."
435 msgstr "El argumento I<name> para la función B<shm_open>() es inválido."
436
437 #. type: TP
438 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
439 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
440 #, no-wrap
441 msgid "B<EMFILE>"
442 msgstr "B<EMFILE>"
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 ""
448 "The per-process limit on the number of open file descriptors has been "
449 "reached."
450 msgstr ""
451 "Se ha alcanzado el límite de descriptores de archivo abiertos para cada "
452 "proceso."
453
454 #. type: TP
455 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
456 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
457 #, no-wrap
458 msgid "B<ENAMETOOLONG>"
459 msgstr "B<ENAMETOOLONG>"
460
461 #. type: Plain text
462 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
463 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
464 msgid "The length of I<name> exceeds B<PATH_MAX>."
465 msgstr "La longitud de I<name> excede B<PATH_MAX>."
466
467 #. type: TP
468 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
469 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
470 #, no-wrap
471 msgid "B<ENFILE>"
472 msgstr "B<ENFILE>"
473
474 #. type: Plain text
475 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
476 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
477 msgid ""
478 "The system-wide limit on the total number of open files has been reached."
479 msgstr ""
480 "Se ha alcanzado el límite máximo de archivos abiertos para el conjunto del "
481 "sistema."
482
483 #. type: TP
484 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
485 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
486 #, no-wrap
487 msgid "B<ENOENT>"
488 msgstr "B<ENOENT>"
489
490 #. type: Plain text
491 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
492 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
493 msgid ""
494 "An attempt was made to B<shm_open>() a I<name> that did not exist, and "
495 "B<O_CREAT> was not specified."
496 msgstr ""
497 "Se llamó a B<shm_open>() con un nombre I<name> que no existe, y no se "
498 "especificó la opción B<O_CREAT>."
499
500 #. type: Plain text
501 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
502 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
503 msgid ""
504 "An attempt was to made to B<shm_unlink>() a I<name> that does not exist."
505 msgstr "Se llamó a B<shm_unlink>() con un nombre I<name> que no existe."
506
507 #. type: SH
508 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
509 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
510 #, no-wrap
511 msgid "ATTRIBUTES"
512 msgstr "ATRIBUTOS"
513
514 #. type: Plain text
515 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
516 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
517 msgid ""
518 "For an explanation of the terms used in this section, see B<attributes>(7)."
519 msgstr ""
520 "Para obtener una explicación de los términos usados en esta sección, véase "
521 "B<attributes>(7)."
522
523 #. type: tbl table
524 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
525 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
526 #, no-wrap
527 msgid "Interface"
528 msgstr "Interfaz"
529
530 #. type: tbl table
531 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
532 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
533 #, no-wrap
534 msgid "Attribute"
535 msgstr "Atributo"
536
537 #. type: tbl table
538 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
539 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
540 #, no-wrap
541 msgid "Value"
542 msgstr "Valor"
543
544 #. type: tbl table
545 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
546 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
547 #, no-wrap
548 msgid ".na\n"
549 msgstr ".na\n"
550
551 #. type: tbl table
552 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
553 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
554 #, no-wrap
555 msgid ".nh\n"
556 msgstr ".nh\n"
557
558 #. type: tbl table
559 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
560 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
561 #, no-wrap
562 msgid ""
563 "B<shm_open>(),\n"
564 "B<shm_unlink>()"
565 msgstr ""
566 "B<shm_open>(),\n"
567 "B<shm_unlink>()"
568
569 #. type: tbl table
570 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
571 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
572 #, no-wrap
573 msgid "Thread safety"
574 msgstr "Seguridad del hilo"
575
576 #. type: tbl table
577 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
578 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
579 #, no-wrap
580 msgid "MT-Safe locale"
581 msgstr "Configuración regional de multi-hilo seguro"
582
583 #. type: SH
584 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
585 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
586 #, no-wrap
587 msgid "VERSIONS"
588 msgstr "VERSIONES"
589
590 #. type: Plain text
591 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
592 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
593 #, fuzzy
594 #| msgid ""
595 #| "POSIX leaves the behavior of the combination of B<O_RDONLY> and "
596 #| "B<O_TRUNC> unspecified. On Linux, this will successfully truncate an "
597 #| "existing shared memory object - this may not be so on other Unices."
598 msgid ""
599 "POSIX leaves the behavior of the combination of B<O_RDONLY> and B<O_TRUNC> "
600 "unspecified. On Linux, this will successfully truncate an existing shared "
601 "memory object\\[em]this may not be so on other UNIX systems."
602 msgstr ""
603 "POSIX deja el comportamiento de la combinación de B<O_RDONLY> y B<O_TRUNC> "
604 "indefinido. En Linux, ésto truncará con éxito un objeto de memoria "
605 "compartida - ésto puede no ser así en otros sistemas Unix."
606
607 #. type: Plain text
608 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
609 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
610 #, fuzzy
611 #| msgid ""
612 #| "The POSIX shared memory object implementation on Linux 2.4 makes use of a "
613 #| "dedicated file system, which is normally mounted under B</dev/shm>."
614 msgid ""
615 "The POSIX shared memory object implementation on Linux makes use of a "
616 "dedicated B<tmpfs>(5) filesystem that is normally mounted under I</dev/shm>."
617 msgstr ""
618 "La implementación del objeto POSIX de memoria compartida en Linux 2.4 "
619 "utiliza un sistema de ficheros dedicado, que es montado habitualmente bajo "
620 "B</dev/shm>."
621
622 #. type: SH
623 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
624 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
625 #, no-wrap
626 msgid "STANDARDS"
627 msgstr "ESTÁNDARES"
628
629 #. type: Plain text
630 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
631 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
632 msgid "POSIX.1-2008."
633 msgstr "POSIX.1-2008."
634
635 #. type: SH
636 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
637 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
638 #, no-wrap
639 msgid "HISTORY"
640 msgstr "HISTORIAL"
641
642 #. type: Plain text
643 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
644 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
645 msgid "glibc 2.2. POSIX.1-2001."
646 msgstr "glibc 2.2. POSIX.1-2001."
647
648 #. type: Plain text
649 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
650 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
651 msgid ""
652 "POSIX.1-2001 says that the group ownership of a newly created shared memory "
653 "object is set to either the calling process's effective group ID or \"a "
654 "system default group ID\". POSIX.1-2008 says that the group ownership may "
655 "be set to either the calling process's effective group ID or, if the object "
656 "is visible in the filesystem, the group ID of the parent directory."
657 msgstr ""
658
659 #. type: SH
660 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
661 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
662 #, no-wrap
663 msgid "EXAMPLES"
664 msgstr "EJEMPLOS"
665
666 #. type: Plain text
667 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
668 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
669 msgid ""
670 "The programs below employ POSIX shared memory and POSIX unnamed semaphores "
671 "to exchange a piece of data. The \"bounce\" program (which must be run "
672 "first) raises the case of a string that is placed into the shared memory by "
673 "the \"send\" program. Once the data has been modified, the \"send\" program "
674 "then prints the contents of the modified shared memory. An example "
675 "execution of the two programs is the following:"
676 msgstr ""
677
678 #. type: Plain text
679 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
680 #: opensuse-tumbleweed
681 #, fuzzy, no-wrap
682 #| msgid ""
683 #| "$ B<./pshm_ucase_bounce /myshm &>\n"
684 #| "[1] 270171\n"
685 #| "$ B<./pshm_ucase_send /myshm hello>\n"
686 #| "HELLO\n"
687 msgid ""
688 "$B< ./pshm_ucase_bounce /myshm &>\n"
689 "[1] 270171\n"
690 "$B< ./pshm_ucase_send /myshm hello>;\n"
691 "HELLO\n"
692 msgstr ""
693 "$ B<./pshm_ucase_bounce /myshm &>\n"
694 "[1] 270171\n"
695 "$ B<./pshm_ucase_send /myshm hello>\n"
696 "HELLO\n"
697
698 #. type: Plain text
699 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
700 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
701 msgid "Further detail about these programs is provided below."
702 msgstr ""
703
704 #. type: SS
705 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
706 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
707 #, no-wrap
708 msgid "Program source: pshm_ucase.h"
709 msgstr ""
710
711 #. type: Plain text
712 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
713 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
714 msgid ""
715 "The following header file is included by both programs below. Its primary "
716 "purpose is to define a structure that will be imposed on the memory object "
717 "that is shared between the two programs."
718 msgstr ""
719
720 #. type: Plain text
721 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
722 #: opensuse-tumbleweed
723 #, no-wrap
724 msgid ""
725 "#ifndef PSHM_UCASE_H\n"
726 "#define PSHM_UCASE_H\n"
727 "\\&\n"
728 "#include E<lt>err.hE<gt>\n"
729 "#include E<lt>semaphore.hE<gt>\n"
730 "#include E<lt>stddef.hE<gt>\n"
731 "#include E<lt>stdio.hE<gt>\n"
732 "#include E<lt>stdlib.hE<gt>\n"
733 "\\&\n"
734 "#define BUF_SIZE 1024 /* Maximum size for exchanged string */\n"
735 "\\&\n"
736 "/* Define a structure that will be imposed on the shared\n"
737 " memory object */\n"
738 "\\&\n"
739 "struct shmbuf {\n"
740 " sem_t sem1; /* POSIX unnamed semaphore */\n"
741 " sem_t sem2; /* POSIX unnamed semaphore */\n"
742 " size_t cnt; /* Number of bytes used in \\[aq]buf\\[aq] */\n"
743 " char buf[BUF_SIZE]; /* Data being transferred */\n"
744 "};\n"
745 "\\&\n"
746 "#endif // include guard\n"
747 msgstr ""
748
749 #. type: SS
750 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
751 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
752 #, no-wrap
753 msgid "Program source: pshm_ucase_bounce.c"
754 msgstr ""
755
756 #. type: Plain text
757 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
758 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
759 msgid ""
760 "The \"bounce\" program creates a new shared memory object with the name "
761 "given in its command-line argument and sizes the object to match the size of "
762 "the I<shmbuf> structure defined in the header file. It then maps the object "
763 "into the process's address space, and initializes two POSIX semaphores "
764 "inside the object to 0."
765 msgstr ""
766
767 #. type: Plain text
768 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
769 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
770 msgid ""
771 "After the \"send\" program has posted the first of the semaphores, the "
772 "\"bounce\" program upper cases the data that has been placed in the memory "
773 "by the \"send\" program and then posts the second semaphore to tell the "
774 "\"send\" program that it may now access the shared memory."
775 msgstr ""
776
777 #. type: Plain text
778 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
779 #: opensuse-tumbleweed
780 #, no-wrap
781 msgid ""
782 "/* pshm_ucase_bounce.c\n"
783 "\\&\n"
784 " Licensed under GNU General Public License v2 or later.\n"
785 "*/\n"
786 "#include E<lt>ctype.hE<gt>\n"
787 "#include E<lt>fcntl.hE<gt>\n"
788 "#include E<lt>stdio.hE<gt>\n"
789 "#include E<lt>stdlib.hE<gt>\n"
790 "#include E<lt>sys/mman.hE<gt>\n"
791 "#include E<lt>unistd.hE<gt>\n"
792 "\\&\n"
793 "#include \"pshm_ucase.h\"\n"
794 "\\&\n"
795 "int\n"
796 "main(int argc, char *argv[])\n"
797 "{\n"
798 " int fd;\n"
799 " char *shmpath;\n"
800 " struct shmbuf *shmp;\n"
801 "\\&\n"
802 " if (argc != 2) {\n"
803 " fprintf(stderr, \"Usage: %s /shm-path\\[rs]n\", argv[0]);\n"
804 " exit(EXIT_FAILURE);\n"
805 " }\n"
806 "\\&\n"
807 " shmpath = argv[1];\n"
808 "\\&\n"
809 " /* Create shared memory object and set its size to the size\n"
810 " of our structure. */\n"
811 "\\&\n"
812 " fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, 0600);\n"
813 " if (fd == -1)\n"
814 " err(EXIT_FAILURE, \"shm_open\");\n"
815 "\\&\n"
816 " if (ftruncate(fd, sizeof(struct shmbuf)) == -1)\n"
817 " err(EXIT_FAILURE, \"ftruncate\");\n"
818 "\\&\n"
819 " /* Map the object into the caller\\[aq]s address space. */\n"
820 "\\&\n"
821 " shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n"
822 " MAP_SHARED, fd, 0);\n"
823 " if (shmp == MAP_FAILED)\n"
824 " err(EXIT_FAILURE, \"mmap\");\n"
825 "\\&\n"
826 " /* Initialize semaphores as process-shared, with value 0. */\n"
827 "\\&\n"
828 " if (sem_init(&shmp-E<gt>sem1, 1, 0) == -1)\n"
829 " err(EXIT_FAILURE, \"sem_init-sem1\");\n"
830 " if (sem_init(&shmp-E<gt>sem2, 1, 0) == -1)\n"
831 " err(EXIT_FAILURE, \"sem_init-sem2\");\n"
832 "\\&\n"
833 " /* Wait for \\[aq]sem1\\[aq] to be posted by peer before touching\n"
834 " shared memory. */\n"
835 "\\&\n"
836 " if (sem_wait(&shmp-E<gt>sem1) == -1)\n"
837 " err(EXIT_FAILURE, \"sem_wait\");\n"
838 "\\&\n"
839 " /* Convert data in shared memory into upper case. */\n"
840 "\\&\n"
841 " for (size_t j = 0; j E<lt> shmp-E<gt>cnt; j++)\n"
842 " shmp-E<gt>buf[j] = toupper((unsigned char) shmp-E<gt>buf[j]);\n"
843 "\\&\n"
844 " /* Post \\[aq]sem2\\[aq] to tell the peer that it can now\n"
845 " access the modified data in shared memory. */\n"
846 "\\&\n"
847 " if (sem_post(&shmp-E<gt>sem2) == -1)\n"
848 " err(EXIT_FAILURE, \"sem_post\");\n"
849 "\\&\n"
850 " /* Unlink the shared memory object. Even if the peer process\n"
851 " is still using the object, this is okay. The object will\n"
852 " be removed only after all open references are closed. */\n"
853 "\\&\n"
854 " shm_unlink(shmpath);\n"
855 "\\&\n"
856 " exit(EXIT_SUCCESS);\n"
857 "}\n"
858 msgstr ""
859
860 #. type: SS
861 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
862 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
863 #, no-wrap
864 msgid "Program source: pshm_ucase_send.c"
865 msgstr ""
866
867 #. type: Plain text
868 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
869 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
870 msgid ""
871 "The \"send\" program takes two command-line arguments: the pathname of a "
872 "shared memory object previously created by the \"bounce\" program and a "
873 "string that is to be copied into that object."
874 msgstr ""
875
876 #. type: Plain text
877 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
878 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
879 msgid ""
880 "The program opens the shared memory object and maps the object into its "
881 "address space. It then copies the data specified in its second argument "
882 "into the shared memory, and posts the first semaphore, which tells the "
883 "\"bounce\" program that it can now access that data. After the \"bounce\" "
884 "program posts the second semaphore, the \"send\" program prints the contents "
885 "of the shared memory on standard output."
886 msgstr ""
887
888 #. type: Plain text
889 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
890 #: opensuse-tumbleweed
891 #, no-wrap
892 msgid ""
893 "/* pshm_ucase_send.c\n"
894 "\\&\n"
895 " Licensed under GNU General Public License v2 or later.\n"
896 "*/\n"
897 "#include E<lt>fcntl.hE<gt>\n"
898 "#include E<lt>stddef.hE<gt>\n"
899 "#include E<lt>stdio.hE<gt>\n"
900 "#include E<lt>stdlib.hE<gt>\n"
901 "#include E<lt>string.hE<gt>\n"
902 "#include E<lt>sys/mman.hE<gt>\n"
903 "#include E<lt>unistd.hE<gt>\n"
904 "\\&\n"
905 "#include \"pshm_ucase.h\"\n"
906 "\\&\n"
907 "int\n"
908 "main(int argc, char *argv[])\n"
909 "{\n"
910 " int fd;\n"
911 " char *shmpath, *string;\n"
912 " size_t len;\n"
913 " struct shmbuf *shmp;\n"
914 "\\&\n"
915 " if (argc != 3) {\n"
916 " fprintf(stderr, \"Usage: %s /shm-path string\\[rs]n\", argv[0]);\n"
917 " exit(EXIT_FAILURE);\n"
918 " }\n"
919 "\\&\n"
920 " shmpath = argv[1];\n"
921 " string = argv[2];\n"
922 " len = strlen(string);\n"
923 "\\&\n"
924 " if (len E<gt> BUF_SIZE) {\n"
925 " fprintf(stderr, \"String is too long\\[rs]n\");\n"
926 " exit(EXIT_FAILURE);\n"
927 " }\n"
928 "\\&\n"
929 " /* Open the existing shared memory object and map it\n"
930 " into the caller\\[aq]s address space. */\n"
931 "\\&\n"
932 " fd = shm_open(shmpath, O_RDWR, 0);\n"
933 " if (fd == -1)\n"
934 " err(EXIT_FAILURE, \"shm_open\");\n"
935 "\\&\n"
936 " shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n"
937 " MAP_SHARED, fd, 0);\n"
938 " if (shmp == MAP_FAILED)\n"
939 " err(EXIT_FAILURE, \"mmap\");\n"
940 "\\&\n"
941 " /* Copy data into the shared memory object. */\n"
942 "\\&\n"
943 " shmp-E<gt>cnt = len;\n"
944 " memcpy(&shmp-E<gt>buf, string, len);\n"
945 "\\&\n"
946 " /* Tell peer that it can now access shared memory. */\n"
947 "\\&\n"
948 " if (sem_post(&shmp-E<gt>sem1) == -1)\n"
949 " err(EXIT_FAILURE, \"sem_post\");\n"
950 "\\&\n"
951 " /* Wait until peer says that it has finished accessing\n"
952 " the shared memory. */\n"
953 "\\&\n"
954 " if (sem_wait(&shmp-E<gt>sem2) == -1)\n"
955 " err(EXIT_FAILURE, \"sem_wait\");\n"
956 "\\&\n"
957 " /* Write modified data in shared memory to standard output. */\n"
958 "\\&\n"
959 " if (write(STDOUT_FILENO, &shmp-E<gt>buf, len) == -1)\n"
960 " err(EXIT_FAILURE, \"write\");\n"
961 " if (write(STDOUT_FILENO, \"\\[rs]n\", 1) == -1)\n"
962 " err(EXIT_FAILURE, \"write\");\n"
963 "\\&\n"
964 " exit(EXIT_SUCCESS);\n"
965 "}\n"
966 msgstr ""
967
968 #. type: SH
969 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
970 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
971 #, no-wrap
972 msgid "SEE ALSO"
973 msgstr "VÉASE TAMBIÉN"
974
975 #. type: Plain text
976 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
977 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
978 msgid ""
979 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
980 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
981 "B<shm_overview>(7)"
982 msgstr ""
983 "B<close>(2), B<fchmod>(2), B<fchown>(2), B<fcntl>(2), B<fstat>(2), "
984 "B<ftruncate>(2), B<memfd_create>(2), B<mmap>(2), B<open>(2), B<umask>(2), "
985 "B<shm_overview>(7)"
986
987 #. type: TH
988 #: debian-trixie
989 #, no-wrap
990 msgid "2024-06-15"
991 msgstr "15 Junio 2024"
992
993 #. type: TH
994 #: debian-trixie
995 #, no-wrap
996 msgid "Linux man-pages 6.9.1"
997 msgstr "Páginas de Manual de Linux 6.9.1"
998
999 #. type: Plain text
1000 #: debian-trixie
1001 msgid "Real-time library (I<librt>, I<-lrt>)"
1002 msgstr "Librería de tiempo real (I<librt>, I<-lrt>)"
1003
1004 #. type: Plain text
1005 #: debian-trixie fedora-44 fedora-rawhide
1006 #, no-wrap
1007 msgid ""
1008 "$ B<./pshm_ucase_bounce /myshm &>\n"
1009 "[1] 270171\n"
1010 "$ B<./pshm_ucase_send /myshm hello>\n"
1011 "HELLO\n"
1012 msgstr ""
1013 "$ B<./pshm_ucase_bounce /myshm &>\n"
1014 "[1] 270171\n"
1015 "$ B<./pshm_ucase_send /myshm hello>\n"
1016 "HELLO\n"
1017
1018 #. type: Plain text
1019 #: debian-trixie fedora-44 fedora-rawhide
1020 #, no-wrap
1021 msgid ""
1022 "#ifndef PSHM_UCASE_H\n"
1023 "#define PSHM_UCASE_H\n"
1024 "\\&\n"
1025 "#include E<lt>semaphore.hE<gt>\n"
1026 "#include E<lt>stddef.hE<gt>\n"
1027 "#include E<lt>stdio.hE<gt>\n"
1028 "#include E<lt>stdlib.hE<gt>\n"
1029 "\\&\n"
1030 "#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\[rs]\n"
1031 " } while (0)\n"
1032 "\\&\n"
1033 "#define BUF_SIZE 1024 /* Maximum size for exchanged string */\n"
1034 "\\&\n"
1035 "/* Define a structure that will be imposed on the shared\n"
1036 " memory object */\n"
1037 "\\&\n"
1038 "struct shmbuf {\n"
1039 " sem_t sem1; /* POSIX unnamed semaphore */\n"
1040 " sem_t sem2; /* POSIX unnamed semaphore */\n"
1041 " size_t cnt; /* Number of bytes used in \\[aq]buf\\[aq] */\n"
1042 " char buf[BUF_SIZE]; /* Data being transferred */\n"
1043 "};\n"
1044 "\\&\n"
1045 "#endif // include guard\n"
1046 msgstr ""
1047
1048 #. type: Plain text
1049 #: debian-trixie fedora-44 fedora-rawhide
1050 #, no-wrap
1051 msgid ""
1052 "/* pshm_ucase_bounce.c\n"
1053 "\\&\n"
1054 " Licensed under GNU General Public License v2 or later.\n"
1055 "*/\n"
1056 "#include E<lt>ctype.hE<gt>\n"
1057 "#include E<lt>fcntl.hE<gt>\n"
1058 "#include E<lt>stdio.hE<gt>\n"
1059 "#include E<lt>stdlib.hE<gt>\n"
1060 "#include E<lt>sys/mman.hE<gt>\n"
1061 "#include E<lt>unistd.hE<gt>\n"
1062 "\\&\n"
1063 "#include \"pshm_ucase.h\"\n"
1064 "\\&\n"
1065 "int\n"
1066 "main(int argc, char *argv[])\n"
1067 "{\n"
1068 " int fd;\n"
1069 " char *shmpath;\n"
1070 " struct shmbuf *shmp;\n"
1071 "\\&\n"
1072 " if (argc != 2) {\n"
1073 " fprintf(stderr, \"Usage: %s /shm-path\\[rs]n\", argv[0]);\n"
1074 " exit(EXIT_FAILURE);\n"
1075 " }\n"
1076 "\\&\n"
1077 " shmpath = argv[1];\n"
1078 "\\&\n"
1079 " /* Create shared memory object and set its size to the size\n"
1080 " of our structure. */\n"
1081 "\\&\n"
1082 " fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, 0600);\n"
1083 " if (fd == -1)\n"
1084 " errExit(\"shm_open\");\n"
1085 "\\&\n"
1086 " if (ftruncate(fd, sizeof(struct shmbuf)) == -1)\n"
1087 " errExit(\"ftruncate\");\n"
1088 "\\&\n"
1089 " /* Map the object into the caller\\[aq]s address space. */\n"
1090 "\\&\n"
1091 " shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n"
1092 " MAP_SHARED, fd, 0);\n"
1093 " if (shmp == MAP_FAILED)\n"
1094 " errExit(\"mmap\");\n"
1095 "\\&\n"
1096 " /* Initialize semaphores as process-shared, with value 0. */\n"
1097 "\\&\n"
1098 " if (sem_init(&shmp-E<gt>sem1, 1, 0) == -1)\n"
1099 " errExit(\"sem_init-sem1\");\n"
1100 " if (sem_init(&shmp-E<gt>sem2, 1, 0) == -1)\n"
1101 " errExit(\"sem_init-sem2\");\n"
1102 "\\&\n"
1103 " /* Wait for \\[aq]sem1\\[aq] to be posted by peer before touching\n"
1104 " shared memory. */\n"
1105 "\\&\n"
1106 " if (sem_wait(&shmp-E<gt>sem1) == -1)\n"
1107 " errExit(\"sem_wait\");\n"
1108 "\\&\n"
1109 " /* Convert data in shared memory into upper case. */\n"
1110 "\\&\n"
1111 " for (size_t j = 0; j E<lt> shmp-E<gt>cnt; j++)\n"
1112 " shmp-E<gt>buf[j] = toupper((unsigned char) shmp-E<gt>buf[j]);\n"
1113 "\\&\n"
1114 " /* Post \\[aq]sem2\\[aq] to tell the peer that it can now\n"
1115 " access the modified data in shared memory. */\n"
1116 "\\&\n"
1117 " if (sem_post(&shmp-E<gt>sem2) == -1)\n"
1118 " errExit(\"sem_post\");\n"
1119 "\\&\n"
1120 " /* Unlink the shared memory object. Even if the peer process\n"
1121 " is still using the object, this is okay. The object will\n"
1122 " be removed only after all open references are closed. */\n"
1123 "\\&\n"
1124 " shm_unlink(shmpath);\n"
1125 "\\&\n"
1126 " exit(EXIT_SUCCESS);\n"
1127 "}\n"
1128 msgstr ""
1129
1130 #. type: Plain text
1131 #: debian-trixie
1132 #, no-wrap
1133 msgid ""
1134 "/* pshm_ucase_send.c\n"
1135 "\\&\n"
1136 " Licensed under GNU General Public License v2 or later.\n"
1137 "*/\n"
1138 "#include E<lt>fcntl.hE<gt>\n"
1139 "#include E<lt>stddef.hE<gt>\n"
1140 "#include E<lt>stdio.hE<gt>\n"
1141 "#include E<lt>stdlib.hE<gt>\n"
1142 "#include E<lt>string.hE<gt>\n"
1143 "#include E<lt>sys/mman.hE<gt>\n"
1144 "#include E<lt>unistd.hE<gt>\n"
1145 "\\&\n"
1146 "#include \"pshm_ucase.h\"\n"
1147 "\\&\n"
1148 "int\n"
1149 "main(int argc, char *argv[])\n"
1150 "{\n"
1151 " int fd;\n"
1152 " char *shmpath, *string;\n"
1153 " size_t len;\n"
1154 " struct shmbuf *shmp;\n"
1155 "\\&\n"
1156 " if (argc != 3) {\n"
1157 " fprintf(stderr, \"Usage: %s /shm-path string\\[rs]n\", argv[0]);\n"
1158 " exit(EXIT_FAILURE);\n"
1159 " }\n"
1160 "\\&\n"
1161 " shmpath = argv[1];\n"
1162 " string = argv[2];\n"
1163 " len = strlen(string);\n"
1164 "\\&\n"
1165 " if (len E<gt> BUF_SIZE) {\n"
1166 " fprintf(stderr, \"String is too long\\[rs]n\");\n"
1167 " exit(EXIT_FAILURE);\n"
1168 " }\n"
1169 "\\&\n"
1170 " /* Open the existing shared memory object and map it\n"
1171 " into the caller\\[aq]s address space. */\n"
1172 "\\&\n"
1173 " fd = shm_open(shmpath, O_RDWR, 0);\n"
1174 " if (fd == -1)\n"
1175 " errExit(\"shm_open\");\n"
1176 "\\&\n"
1177 " shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n"
1178 " MAP_SHARED, fd, 0);\n"
1179 " if (shmp == MAP_FAILED)\n"
1180 " errExit(\"mmap\");\n"
1181 "\\&\n"
1182 " /* Copy data into the shared memory object. */\n"
1183 "\\&\n"
1184 " shmp-E<gt>cnt = len;\n"
1185 " memcpy(&shmp-E<gt>buf, string, len);\n"
1186 "\\&\n"
1187 " /* Tell peer that it can now access shared memory. */\n"
1188 "\\&\n"
1189 " if (sem_post(&shmp-E<gt>sem1) == -1)\n"
1190 " errExit(\"sem_post\");\n"
1191 "\\&\n"
1192 " /* Wait until peer says that it has finished accessing\n"
1193 " the shared memory. */\n"
1194 "\\&\n"
1195 " if (sem_wait(&shmp-E<gt>sem2) == -1)\n"
1196 " errExit(\"sem_wait\");\n"
1197 "\\&\n"
1198 " /* Write modified data in shared memory to standard output. */\n"
1199 "\\&\n"
1200 " write(STDOUT_FILENO, &shmp-E<gt>buf, len);\n"
1201 " write(STDOUT_FILENO, \"\\[rs]n\", 1);\n"
1202 "\\&\n"
1203 " exit(EXIT_SUCCESS);\n"
1204 "}\n"
1205 msgstr ""
1206
1207 #. type: TH
1208 #: fedora-44 fedora-rawhide
1209 #, no-wrap
1210 msgid "2024-07-23"
1211 msgstr "23 ​​Julio 2024"
1212
1213 #. type: TH
1214 #: fedora-44 fedora-rawhide
1215 #, no-wrap
1216 msgid "Linux man-pages 6.13"
1217 msgstr "Páginas de Manual de Linux 6.13"
1218
1219 #. type: Plain text
1220 #: fedora-44 fedora-rawhide
1221 #, no-wrap
1222 msgid ""
1223 "/* pshm_ucase_send.c\n"
1224 "\\&\n"
1225 " Licensed under GNU General Public License v2 or later.\n"
1226 "*/\n"
1227 "#include E<lt>fcntl.hE<gt>\n"
1228 "#include E<lt>stddef.hE<gt>\n"
1229 "#include E<lt>stdio.hE<gt>\n"
1230 "#include E<lt>stdlib.hE<gt>\n"
1231 "#include E<lt>string.hE<gt>\n"
1232 "#include E<lt>sys/mman.hE<gt>\n"
1233 "#include E<lt>unistd.hE<gt>\n"
1234 "\\&\n"
1235 "#include \"pshm_ucase.h\"\n"
1236 "\\&\n"
1237 "int\n"
1238 "main(int argc, char *argv[])\n"
1239 "{\n"
1240 " int fd;\n"
1241 " char *shmpath, *string;\n"
1242 " size_t len;\n"
1243 " struct shmbuf *shmp;\n"
1244 "\\&\n"
1245 " if (argc != 3) {\n"
1246 " fprintf(stderr, \"Usage: %s /shm-path string\\[rs]n\", argv[0]);\n"
1247 " exit(EXIT_FAILURE);\n"
1248 " }\n"
1249 "\\&\n"
1250 " shmpath = argv[1];\n"
1251 " string = argv[2];\n"
1252 " len = strlen(string);\n"
1253 "\\&\n"
1254 " if (len E<gt> BUF_SIZE) {\n"
1255 " fprintf(stderr, \"String is too long\\[rs]n\");\n"
1256 " exit(EXIT_FAILURE);\n"
1257 " }\n"
1258 "\\&\n"
1259 " /* Open the existing shared memory object and map it\n"
1260 " into the caller\\[aq]s address space. */\n"
1261 "\\&\n"
1262 " fd = shm_open(shmpath, O_RDWR, 0);\n"
1263 " if (fd == -1)\n"
1264 " errExit(\"shm_open\");\n"
1265 "\\&\n"
1266 " shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,\n"
1267 " MAP_SHARED, fd, 0);\n"
1268 " if (shmp == MAP_FAILED)\n"
1269 " errExit(\"mmap\");\n"
1270 "\\&\n"
1271 " /* Copy data into the shared memory object. */\n"
1272 "\\&\n"
1273 " shmp-E<gt>cnt = len;\n"
1274 " memcpy(&shmp-E<gt>buf, string, len);\n"
1275 "\\&\n"
1276 " /* Tell peer that it can now access shared memory. */\n"
1277 "\\&\n"
1278 " if (sem_post(&shmp-E<gt>sem1) == -1)\n"
1279 " errExit(\"sem_post\");\n"
1280 "\\&\n"
1281 " /* Wait until peer says that it has finished accessing\n"
1282 " the shared memory. */\n"
1283 "\\&\n"
1284 " if (sem_wait(&shmp-E<gt>sem2) == -1)\n"
1285 " errExit(\"sem_wait\");\n"
1286 "\\&\n"
1287 " /* Write modified data in shared memory to standard output. */\n"
1288 "\\&\n"
1289 " if (write(STDOUT_FILENO, &shmp-E<gt>buf, len) == -1)\n"
1290 " errExit(\"write\");\n"
1291 " if (write(STDOUT_FILENO, \"\\[rs]n\", 1) == -1)\n"
1292 " errExit(\"write\");\n"
1293 "\\&\n"
1294 " exit(EXIT_SUCCESS);\n"
1295 "}\n"
1296 msgstr ""
1297
1298 #. type: TH
1299 #: mageia-cauldron
1300 #, no-wrap
1301 msgid "Linux man-pages 6.17"
1302 msgstr "Páginas de Manual de Linux 6.17"
1303
1304 #. type: TH
1305 #: opensuse-leap-16-1 opensuse-tumbleweed
1306 #, no-wrap
1307 msgid "Linux man-pages (unreleased)"
1308 msgstr "Páginas de Manual de Linux (no publicadas)"