Debian Codegraph @

po/pt_BR/man7/unix.7.po

raw
1 # Brazilian Portuguese translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Rubens de Jesus Nogueira <[email protected]>, 2000.
5 # André Luiz Fassone <[email protected]>, 2000.
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: manpages-l10n\n"
9 "POT-Creation-Date: 2026-06-05 06:50+0200\n"
10 "PO-Revision-Date: 2000-05-31 17:26+0200\n"
11 "Last-Translator: André Luiz Fassone <[email protected]>\n"
12 "Language-Team: Brazilian Portuguese <debian-l10n-"
13 "[email protected]>\n"
14 "Language: pt_BR\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
19 "X-Generator: Lokalize 20.04.1\n"
20
21 #. type: TH
22 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
23 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
24 #, no-wrap
25 msgid "UNIX"
26 msgstr "UNIX"
27
28 #. type: TH
29 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
30 #: opensuse-tumbleweed
31 #, no-wrap
32 msgid "2026-02-08"
33 msgstr "8 fevereiro 2026"
34
35 #. type: TH
36 #: archlinux debian-unstable
37 #, fuzzy, no-wrap
38 #| msgid "Linux man-pages 6.17"
39 msgid "Linux man-pages 6.18"
40 msgstr "Linux man-pages 6.17"
41
42 #. type: SH
43 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
44 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
45 #, no-wrap
46 msgid "NAME"
47 msgstr "NOME"
48
49 #. type: Plain text
50 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
51 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
52 msgid "unix - sockets for local interprocess communication"
53 msgstr "unix - 'sockets' para comunicação interprocessos local"
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 "SYNOPSIS"
60 msgstr "SINOPSE"
61
62 #. type: Plain text
63 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
64 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
65 #, no-wrap
66 msgid ""
67 "B<#include E<lt>sys/socket.hE<gt>>\n"
68 "B<#include E<lt>sys/un.hE<gt>>\n"
69 msgstr ""
70 "B<#include E<lt>sys/socket.hE<gt>>\n"
71 "B<#include E<lt>sys/un.hE<gt>>\n"
72
73 #. type: Plain text
74 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
75 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
76 #, no-wrap
77 msgid ""
78 "I<unix_socket>B< = socket(AF_UNIX, type, 0);>\n"
79 "I<error>B< = socketpair(AF_UNIX, type, 0, int *>I<sv>B<);>\n"
80 msgstr ""
81 "I<unix_socket>B< = socket(AF_UNIX, type, 0);>\n"
82 "I<error>B< = socketpair(AF_UNIX, type, 0, int *>I<sv>B<);>\n"
83
84 #. type: SH
85 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
86 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
87 #, no-wrap
88 msgid "DESCRIPTION"
89 msgstr "DESCRIÇÃO"
90
91 #. type: Plain text
92 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
93 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
94 #, fuzzy
95 #| msgid ""
96 #| "The B<PF_UNIX> (also known as B<PF_LOCAL>) socket family is used to "
97 #| "communicate between processes on the same machine efficiently. Unix "
98 #| "sockets can be either anonymous (created by B<socketpair>(2)) or "
99 #| "associated with a file of socket type. Linux also supports an abstract "
100 #| "namespace which is independent of the file system."
101 msgid ""
102 "The B<AF_UNIX> (also known as B<AF_LOCAL>) socket family is used to "
103 "communicate between processes on the same machine efficiently. "
104 "Traditionally, UNIX domain sockets can be either unnamed, or bound to a "
105 "filesystem pathname (marked as being of type socket). Linux also supports "
106 "an abstract namespace which is independent of the filesystem."
107 msgstr ""
108 "A família de 'sockets' B<PF_UNIX> (também conhecida como B<PF_LOCAL>) é "
109 "usada para comunicação eficiente entre processos na mesma máquina. 'Sockets' "
110 "Unix podem ser anônimos (criados pelo B<socketpair>(2)) ou associados com um "
111 "arquivo do tipo do 'socket'. O Linux também suporta um espaço de nomes "
112 "abstrato, que é independente do sistema de arquivos."
113
114 #. type: Plain text
115 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
116 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
117 msgid ""
118 "Valid socket types in the UNIX domain are: B<SOCK_STREAM>, for a stream-"
119 "oriented socket; B<SOCK_DGRAM>, for a datagram-oriented socket that "
120 "preserves message boundaries (as on most UNIX implementations, UNIX domain "
121 "datagram sockets are always reliable and don't reorder datagrams); and "
122 "(since Linux 2.6.4) B<SOCK_SEQPACKET>, for a sequenced-packet socket that "
123 "is connection-oriented, preserves message boundaries, and delivers messages "
124 "in the order that they were sent."
125 msgstr ""
126
127 #. type: Plain text
128 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
129 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
130 #, fuzzy
131 #| msgid ""
132 #| "Unix sockets support passing file descriptors or process credentials to "
133 #| "other processes as ancillary data to datagrams."
134 msgid ""
135 "UNIX domain sockets support passing file descriptors or process credentials "
136 "to other processes using ancillary data."
137 msgstr ""
138 "Os 'sockets' Unix suportam a passagem para outros processos de descritores "
139 "de arquivos ou credenciais de processos, como dados ancilares para "
140 "datagramas."
141
142 #. type: SS
143 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
144 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
145 #, no-wrap
146 msgid "Address format"
147 msgstr "Formato de endereço"
148
149 #. type: Plain text
150 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
151 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
152 msgid "A UNIX domain socket address is represented in the following structure:"
153 msgstr ""
154
155 #. #define UNIX_PATH_MAX 108
156 #. type: Plain text
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 #, no-wrap
160 msgid ""
161 "struct sockaddr_un {\n"
162 " sa_family_t sun_family; /* AF_UNIX */\n"
163 " char sun_path[108]; /* Pathname */\n"
164 "};\n"
165 msgstr ""
166 "struct sockaddr_un {\n"
167 " sa_family_t sun_family; /* AF_UNIX */\n"
168 " char sun_path[108]; /* diretório */\n"
169 "};\n"
170
171 #. type: Plain text
172 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
173 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
174 msgid ""
175 "The I<sun_family> field always contains B<AF_UNIX>. On Linux, I<sun_path> "
176 "is 108 bytes in size; see also BUGS, below."
177 msgstr ""
178
179 #. type: Plain text
180 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
181 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
182 msgid ""
183 "Various system calls (for example, B<bind>(2), B<connect>(2), and "
184 "B<sendto>(2)) take a I<sockaddr_un> argument as input. Some other system "
185 "calls (for example, B<getsockname>(2), B<getpeername>(2), B<recvfrom>(2), "
186 "and B<accept>(2)) return an argument of this type."
187 msgstr ""
188
189 #. type: Plain text
190 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
191 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
192 msgid ""
193 "Three types of address are distinguished in the I<sockaddr_un> structure:"
194 msgstr ""
195
196 #. type: TP
197 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
198 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
199 #, fuzzy, no-wrap
200 #| msgid "name"
201 msgid "pathname"
202 msgstr "nome"
203
204 #. type: Plain text
205 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
206 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
207 msgid ""
208 "a UNIX domain socket can be bound to a null-terminated filesystem pathname "
209 "using B<bind>(2). When the address of a pathname socket is returned (by one "
210 "of the system calls noted above), its length is"
211 msgstr ""
212
213 #. type: Plain text
214 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
215 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
216 #, no-wrap
217 msgid "offsetof(struct sockaddr_un, sun_path) + strlen(sun_path) + 1\n"
218 msgstr "offsetof(struct sockaddr_un, sun_path) + strlen(sun_path) + 1\n"
219
220 #. type: Plain text
221 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
222 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
223 msgid ""
224 "and I<sun_path> contains the null-terminated pathname. (On Linux, the above "
225 "B<offsetof>() expression equates to the same value as "
226 "I<sizeof(sa_family_t)>, but some other implementations include other fields "
227 "before I<sun_path>, so the B<offsetof>() expression more portably describes "
228 "the size of the address structure.)"
229 msgstr ""
230
231 #. type: Plain text
232 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
233 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
234 msgid "For further details of pathname sockets, see below."
235 msgstr ""
236
237 #. type: TP
238 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
239 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
240 #, fuzzy, no-wrap
241 #| msgid "name"
242 msgid "unnamed"
243 msgstr "nome"
244
245 #. There is quite some variation across implementations: FreeBSD
246 #. says the length is 16 bytes, HP-UX 11 says it's zero bytes.
247 #. type: Plain text
248 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
249 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
250 msgid ""
251 "A stream socket that has not been bound to a pathname using B<bind>(2) has "
252 "no name. Likewise, the two sockets created by B<socketpair>(2) are "
253 "unnamed. When the address of an unnamed socket is returned, its length is "
254 "I<sizeof(sa_family_t)>, and I<sun_path> should not be inspected."
255 msgstr ""
256
257 #. type: TP
258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
260 #, no-wrap
261 msgid "abstract"
262 msgstr ""
263
264 #. type: Plain text
265 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
266 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
267 msgid ""
268 "an abstract socket address is distinguished (from a pathname socket) by the "
269 "fact that I<sun_path[0]> is a null byte (\\[aq]\\[rs]0\\[aq]). The socket's "
270 "address in this namespace is given by the additional bytes in I<sun_path> "
271 "that are covered by the specified length of the address structure. (Null "
272 "bytes in the name have no special significance.) The name has no connection "
273 "with filesystem pathnames. When the address of an abstract socket is "
274 "returned, the returned I<addrlen> is greater than I<sizeof(sa_family_t)> "
275 "(i.e., greater than 2), and the name of the socket is contained in the first "
276 "I<(addrlen - sizeof(sa_family_t))> bytes of I<sun_path>."
277 msgstr ""
278
279 #. type: SS
280 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
281 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
282 #, no-wrap
283 msgid "Pathname sockets"
284 msgstr ""
285
286 #. type: Plain text
287 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
288 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
289 msgid ""
290 "When binding a socket to a pathname, a few rules should be observed for "
291 "maximum portability and ease of coding:"
292 msgstr ""
293
294 #. type: IP
295 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
296 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
297 #, no-wrap
298 msgid "\\[bu]"
299 msgstr "\\[bu]"
300
301 #. type: Plain text
302 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
303 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
304 msgid "The pathname in I<sun_path> should be null-terminated."
305 msgstr ""
306
307 #. type: Plain text
308 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
309 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
310 msgid ""
311 "The length of the pathname, including the terminating null byte, should not "
312 "exceed the size of I<sun_path>."
313 msgstr ""
314
315 #. type: Plain text
316 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
317 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
318 msgid ""
319 "The I<addrlen> argument that describes the enclosing I<sockaddr_un> "
320 "structure should have a value of at least:"
321 msgstr ""
322
323 #. type: Plain text
324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
326 #, no-wrap
327 msgid "offsetof(struct sockaddr_un, sun_path)+strlen(addr.sun_path)+1\n"
328 msgstr "offsetof(struct sockaddr_un, sun_path)+strlen(addr.sun_path)+1\n"
329
330 #. type: Plain text
331 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
332 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
333 msgid ""
334 "or, more simply, I<addrlen> can be specified as I<sizeof(struct "
335 "sockaddr_un)>."
336 msgstr ""
337
338 #. Linux does this, including for the case where the supplied path
339 #. is 108 bytes
340 #. type: Plain text
341 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
342 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
343 msgid ""
344 "There is some variation in how implementations handle UNIX domain socket "
345 "addresses that do not follow the above rules. For example, some (but not "
346 "all) implementations append a null terminator if none is present in the "
347 "supplied I<sun_path>."
348 msgstr ""
349
350 #. HP-UX
351 #. Modern BSDs generally have 104, Tru64 and AIX have 104,
352 #. Solaris and Irix have 108
353 #. type: Plain text
354 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
355 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
356 msgid ""
357 "When coding portable applications, keep in mind that some implementations "
358 "have I<sun_path> as short as 92 bytes."
359 msgstr ""
360
361 #. type: Plain text
362 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
363 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
364 msgid ""
365 "Various system calls (B<accept>(2), B<recvfrom>(2), B<getsockname>(2), "
366 "B<getpeername>(2)) return socket address structures. When applied to UNIX "
367 "domain sockets, the value-result I<addrlen> argument supplied to the call "
368 "should be initialized as above. Upon return, the argument is set to "
369 "indicate the I<actual> size of the address structure. The caller should "
370 "check the value returned in this argument: if the output value exceeds the "
371 "input value, then there is no guarantee that a null terminator is present in "
372 "I<sun_path>. (See BUGS.)"
373 msgstr ""
374
375 #. type: SS
376 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
377 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
378 #, no-wrap
379 msgid "Pathname socket ownership and permissions"
380 msgstr ""
381
382 #. type: Plain text
383 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
384 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
385 msgid ""
386 "In the Linux implementation, pathname sockets honor the permissions of the "
387 "directory they are in. Creation of a new socket fails if the process does "
388 "not have write and search (execute) permission on the directory in which the "
389 "socket is created."
390 msgstr ""
391
392 #. type: Plain text
393 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
394 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
395 msgid ""
396 "On Linux, connecting to a stream socket object requires write permission on "
397 "that socket; sending a datagram to a datagram socket likewise requires write "
398 "permission on that socket. POSIX does not make any statement about the "
399 "effect of the permissions on a socket file, and on some systems (e.g., older "
400 "BSDs), the socket permissions are ignored. Portable programs should not "
401 "rely on this feature for security."
402 msgstr ""
403
404 #. type: Plain text
405 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
406 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
407 msgid ""
408 "When creating a new socket, the owner and group of the socket file are set "
409 "according to the usual rules. The socket file has all permissions enabled, "
410 "other than those that are turned off by the process B<umask>(2)."
411 msgstr ""
412
413 #. However, fchown() and fchmod() do not seem to have an effect
414 #. type: Plain text
415 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
416 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
417 msgid ""
418 "The owner, group, and permissions of a pathname socket can be changed (using "
419 "B<chown>(2) and B<chmod>(2))."
420 msgstr ""
421
422 #. type: SS
423 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
424 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
425 #, no-wrap
426 msgid "Abstract sockets"
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 ""
433 "Socket permissions have no meaning for abstract sockets: the process "
434 "B<umask>(2) has no effect when binding an abstract socket, and changing the "
435 "ownership and permissions of the object (via B<fchown>(2) and "
436 "B<fchmod>(2)) has no effect on the accessibility of the socket."
437 msgstr ""
438
439 #. type: Plain text
440 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
441 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
442 msgid ""
443 "Abstract sockets automatically disappear when all open references to the "
444 "socket are closed."
445 msgstr ""
446
447 #. type: Plain text
448 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
449 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
450 msgid "The abstract socket namespace is a nonportable Linux extension."
451 msgstr ""
452
453 #. type: SS
454 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
455 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
456 #, no-wrap
457 msgid "Socket options"
458 msgstr "Opções de socket"
459
460 #. type: Plain text
461 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
462 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
463 msgid ""
464 "For historical reasons, these socket options are specified with a "
465 "B<SOL_SOCKET> type even though they are B<AF_UNIX> specific. They can be "
466 "set with B<setsockopt>(2) and read with B<getsockopt>(2) by specifying "
467 "B<SOL_SOCKET> as the socket family."
468 msgstr ""
469 "Por razões históricas, essas opções de 'socket' são especificadas com um "
470 "tipo B<SOL_SOCKET> mesmo sendo específicos do B<AF_UNIX>. Eles podem ser "
471 "selecionados com B<setsockopt>(2) e lidos com B<getsockopt>(2) especificando-"
472 "se B<SOL_SOCKET> como a família de 'socket'."
473
474 #. type: TP
475 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
476 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
477 #, no-wrap
478 msgid "B<SO_PASSCRED>"
479 msgstr "B<SO_PASSCRED>"
480
481 #. type: Plain text
482 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
483 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
484 msgid ""
485 "Enabling this socket option causes receipt of the credentials of the sending "
486 "process in an B<SCM_CREDENTIALS ancillary> message in each subsequently "
487 "received message. The returned credentials are those specified by the "
488 "sender using B<SCM_CREDENTIALS>, or a default that includes the sender's "
489 "PID, real user ID, and real group ID, if the sender did not specify "
490 "B<SCM_CREDENTIALS> ancillary data."
491 msgstr ""
492
493 #. type: Plain text
494 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
495 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
496 #, fuzzy
497 #| msgid ""
498 #| "B<SO_PASSCRED> enables the receiving of the credentials of the sending "
499 #| "process ancillary message. When this option is set and the socket is not "
500 #| "connected yet an unique name in the abstract namespace will be generated "
501 #| "automatically. Expects an integer boolean flag."
502 msgid ""
503 "When this option is set and the socket is not yet connected, a unique name "
504 "in the abstract namespace will be generated automatically."
505 msgstr ""
506 "B<SO_PASSCRED> habilita o recebimento das credenciais da mensagem ancilar de "
507 "processo de envio. Quando essa opção é setada e o 'socket' ainda não está "
508 "conectado, um nome único será gerado automaticamente no espaço de nomes "
509 "abstrato. Espera um sinalizador booleano inteiro."
510
511 #. type: Plain text
512 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
513 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
514 msgid ""
515 "The value given as an argument to B<setsockopt>(2) and returned as the "
516 "result of B<getsockopt>(2) is an integer boolean flag."
517 msgstr ""
518
519 #. type: TP
520 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
521 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
522 #, no-wrap
523 msgid "B<SO_PASSSEC>"
524 msgstr "B<SO_PASSSEC>"
525
526 #. type: Plain text
527 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
528 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
529 msgid ""
530 "Enables receiving of the SELinux security label of the peer socket in an "
531 "ancillary message of type B<SCM_SECURITY> (see below)."
532 msgstr ""
533
534 #. commit 877ce7c1b3afd69a9b1caeb1b9964c992641f52a
535 #. commit 37a9a8df8ce9de6ea73349c9ac8bdf6ba4ec4f70
536 #. type: Plain text
537 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
538 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
539 msgid ""
540 "The B<SO_PASSSEC> option is supported for UNIX domain datagram sockets since "
541 "Linux 2.6.18; support for UNIX domain stream sockets was added in Linux 4.2."
542 msgstr ""
543
544 #. type: TP
545 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
546 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
547 #, no-wrap
548 msgid "B<SO_PEEK_OFF>"
549 msgstr "B<SO_PEEK_OFF>"
550
551 #. type: Plain text
552 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
553 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
554 msgid "See B<socket>(7)."
555 msgstr "Veja também B<socket>(7)."
556
557 #. type: TP
558 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
559 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
560 #, no-wrap
561 msgid "B<SO_PEERCRED>"
562 msgstr "B<SO_PEERCRED>"
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 "This read-only socket option returns the credentials of the peer process "
569 "connected to this socket. The returned credentials are those that were in "
570 "effect at the time of the call to B<connect>(2), B<listen>(2), or "
571 "B<socketpair>(2)."
572 msgstr ""
573
574 #. type: Plain text
575 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
576 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
577 msgid ""
578 "The argument to B<getsockopt>(2) is a pointer to a I<ucred> structure; "
579 "define the B<_GNU_SOURCE> feature test macro to obtain the definition of "
580 "that structure from I<E<lt>sys/socket.hE<gt>>."
581 msgstr ""
582
583 #. type: Plain text
584 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
585 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
586 msgid ""
587 "The use of this option is possible only for connected B<AF_UNIX> stream "
588 "sockets and for B<AF_UNIX> stream and datagram socket pairs created using "
589 "B<socketpair>(2)."
590 msgstr ""
591
592 #. type: SS
593 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
594 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
595 #, no-wrap
596 msgid "Autobind feature"
597 msgstr ""
598
599 #. i.e., sizeof(short)
600 #. type: Plain text
601 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
602 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
603 msgid ""
604 "If a B<bind>(2) call specifies I<addrlen> as I<sizeof(sa_family_t)>, or the "
605 "B<SO_PASSCRED> socket option was specified for a socket that was not "
606 "explicitly bound to an address, then the socket is autobound to an abstract "
607 "address. The address consists of a null byte followed by 5 bytes in the "
608 "character set I<[0-9a-f]>. Thus, there is a limit of 2\\[ha]20 autobind "
609 "addresses. (From Linux 2.1.15, when the autobind feature was added, 8 bytes "
610 "were used, and the limit was thus 2\\[ha]32 autobind addresses. The change "
611 "to 5 bytes came in Linux 2.3.15.)"
612 msgstr ""
613
614 #. type: SS
615 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
616 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
617 #, no-wrap
618 msgid "Sockets API"
619 msgstr ""
620
621 #. type: Plain text
622 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
623 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
624 msgid ""
625 "The following paragraphs describe domain-specific details and unsupported "
626 "features of the sockets API for UNIX domain sockets on Linux."
627 msgstr ""
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 ""
633 "UNIX domain sockets do not support the transmission of out-of-band data (the "
634 "B<MSG_OOB> flag for B<send>(2) and B<recv>(2))."
635 msgstr ""
636
637 #. type: Plain text
638 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
639 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
640 msgid ""
641 "The B<send>(2) B<MSG_MORE> flag is not supported by UNIX domain sockets."
642 msgstr ""
643
644 #. commit 9f6f9af7694ede6314bed281eec74d588ba9474f
645 #. type: Plain text
646 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
647 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
648 msgid ""
649 "Before Linux 3.4, the use of B<MSG_TRUNC> in the I<flags> argument of "
650 "B<recv>(2) was not supported by UNIX domain sockets."
651 msgstr ""
652
653 #. type: Plain text
654 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
655 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
656 msgid ""
657 "The B<SO_SNDBUF> socket option does have an effect for UNIX domain sockets, "
658 "but the B<SO_RCVBUF> option does not. For datagram sockets, the "
659 "B<SO_SNDBUF> value imposes an upper limit on the size of outgoing "
660 "datagrams. This limit is calculated as the doubled (see B<socket>(7)) "
661 "option value less 32 bytes used for overhead."
662 msgstr ""
663
664 #. type: SS
665 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
666 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
667 #, no-wrap
668 msgid "Ancillary messages"
669 msgstr ""
670
671 #. type: Plain text
672 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
673 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
674 #, fuzzy
675 #| msgid ""
676 #| "For historical reasons these ancillary message type are specified with a "
677 #| "SOL_SOCKET type even though they are PF_UNIX specific. To send them set "
678 #| "the B<cmsg_level> field of the struct B<cmsghdr> to SOL_SOCKET and the "
679 #| "B<cmsg_type> field to the type. For more information see B<cmsg>(3)."
680 msgid ""
681 "Ancillary data is sent and received using B<sendmsg>(2) and B<recvmsg>(2). "
682 "For historical reasons, the ancillary message types listed below are "
683 "specified with a B<SOL_SOCKET> type even though they are B<AF_UNIX> "
684 "specific. To send them, set the I<cmsg_level> field of the struct "
685 "I<cmsghdr> to B<SOL_SOCKET> and the I<cmsg_type> field to the type. For "
686 "more information, see B<cmsg>(3)."
687 msgstr ""
688 "Por razões históricas, esses tipos de mensagens ancilares são especificados "
689 "com um tipo SOL_SOCKET mesmo sendo específicos do PF_UNIX. Para enviá-los, "
690 "setar o campo B<cmsg_level> da estrutura B<cmsghdr> com SOL_SOCKET, e o "
691 "campo B<cmsg_type> com o tipo. Para mais informações, veja B<cmsg>(3)."
692
693 #. type: TP
694 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
695 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
696 #, no-wrap
697 msgid "B<SCM_RIGHTS>"
698 msgstr "B<SCM_RIGHTS>"
699
700 #. type: Plain text
701 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
702 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
703 #, fuzzy
704 #| msgid ""
705 #| "Send or receive a set of open file descriptors from another process. The "
706 #| "data portion contains a integer array of the file descriptors. The "
707 #| "passed file descriptors behave as like they have been created with "
708 #| "B<dup>(2)."
709 msgid ""
710 "Send or receive a set of open file descriptors from another process. The "
711 "data portion contains an integer array of the file descriptors."
712 msgstr ""
713 "Envia ou recebe um conjunto de descritores de arquivo de outro processo. A "
714 "porção de dados contém uma matriz de inteiros com os descritores de "
715 "arquivos. Os descritores de arquivo passados se comportam como se tivessem "
716 "sido criados com B<dup>(2)."
717
718 #. type: Plain text
719 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
720 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
721 msgid ""
722 "Commonly, this operation is referred to as \"passing a file descriptor\" to "
723 "another process. However, more accurately, what is being passed is a "
724 "reference to an open file description (see B<open>(2)), and in the receiving "
725 "process it is likely that a different file descriptor number will be used. "
726 "Semantically, this operation is equivalent to duplicating (B<dup>(2)) a "
727 "file descriptor into the file descriptor table of another process."
728 msgstr ""
729
730 #. type: Plain text
731 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
732 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
733 msgid ""
734 "If the buffer used to receive the ancillary data containing file descriptors "
735 "is too small (or is absent), then the ancillary data is truncated (or "
736 "discarded) and the excess file descriptors are automatically closed in the "
737 "receiving process."
738 msgstr ""
739
740 #. type: Plain text
741 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
742 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
743 msgid ""
744 "If the number of file descriptors received in the ancillary data would cause "
745 "the process to exceed its B<RLIMIT_NOFILE> resource limit (see "
746 "B<getrlimit>(2)), the excess file descriptors are automatically closed in "
747 "the receiving process."
748 msgstr ""
749
750 #. commit bba14de98753cb6599a2dae0e520714b2153522d
751 #. type: Plain text
752 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
753 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
754 msgid ""
755 "The kernel constant B<SCM_MAX_FD> defines a limit on the number of file "
756 "descriptors in the array. Attempting to send an array larger than this "
757 "limit causes B<sendmsg>(2) to fail with the error B<EINVAL>. B<SCM_MAX_FD> "
758 "has the value 253 (or 255 before Linux 2.6.38)."
759 msgstr ""
760
761 #. type: TP
762 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
763 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
764 #, no-wrap
765 msgid "B<SCM_CREDENTIALS>"
766 msgstr "B<SCM_CREDENTIALS>"
767
768 #. type: Plain text
769 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
770 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
771 #, fuzzy
772 #| msgid ""
773 #| "Send or receive unix credentials. This can be used for authentication. "
774 #| "The credentials are passed as a B<struct ucred> ancillary message."
775 msgid ""
776 "Send or receive UNIX credentials. This can be used for authentication. The "
777 "credentials are passed as a I<struct ucred> ancillary message. This "
778 "structure is defined in I<E<lt>sys/socket.hE<gt>> as follows:"
779 msgstr ""
780 "Envia ou recebe credenciais do unix. Isto pode ser usado para autenticação. "
781 "As credenciais são passadas como uma mensagem ancilar de B<struct ucred>."
782
783 #. type: Plain text
784 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
785 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
786 #, no-wrap
787 msgid ""
788 "struct ucred {\n"
789 " pid_t pid; /* Process ID of the sending process */\n"
790 " uid_t uid; /* User ID of the sending process */\n"
791 " gid_t gid; /* Group ID of the sending process */\n"
792 "};\n"
793 msgstr ""
794 "struct ucred {\n"
795 " pid_t pid; /* ID de processo do processo de envio */\n"
796 " uid_t uid; /* ID de usuário do processo de envio */\n"
797 " gid_t gid; /* ID de grupo do processo de envio */\n"
798 "};\n"
799
800 #. type: Plain text
801 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
802 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
803 msgid ""
804 "Since glibc 2.8, the B<_GNU_SOURCE> feature test macro must be defined "
805 "(before including I<any> header files) in order to obtain the definition of "
806 "this structure."
807 msgstr ""
808
809 #. type: Plain text
810 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
811 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
812 #, fuzzy
813 #| msgid ""
814 #| "The credentials which the sender specifies are checked by the kernel. A "
815 #| "process with effective user id 0 is allowed to specify values that do not "
816 #| "match his own. The sender must specify its own process id (unless it has "
817 #| "B<CAP_SYS_ADMIN>), its user id, effective user id or set user id (unless "
818 #| "it has B<CAP_SETUID>), and its group id, effective group id or set group "
819 #| "id (unless it has B<CAP_SETGID>). To receive a B<struct ucred> message "
820 #| "the B<SO_PASSCRED> option must be enabled on the socket."
821 msgid ""
822 "The credentials which the sender specifies are checked by the kernel. A "
823 "privileged process is allowed to specify values that do not match its own. "
824 "The sender must specify its own process ID (unless it has the capability "
825 "B<CAP_SYS_ADMIN>, in which case the PID of any existing process may be "
826 "specified), its real user ID, effective user ID, or saved set-user-ID "
827 "(unless it has B<CAP_SETUID>), and its real group ID, effective group ID, or "
828 "saved set-group-ID (unless it has B<CAP_SETGID>)."
829 msgstr ""
830 "As credenciais que o remetente especifica são verificadas pelo kernel. Um "
831 "processo com id de usuário efetivo igual a 0 tem permissão para especificar "
832 "valores que não casam com o seu próprio valor. O remetente precisa "
833 "especificar seu próprio id de processo (a menos que ele tenha "
834 "B<CAP_SYS_ADMIN>), seu id de usuário, id de usuário efetivo ou setar o id de "
835 "usuário (a menos que ele tenha B<CAP_SETUID>), e seu id de grupo, id de "
836 "grupo efetivo ou setar o id do grupo (a menos que ele tenha B<CAP_SETGID>). "
837 "Para receber uma mensagem de B<struct ucred> a opção B<SO_PASSCRED> precisa "
838 "estar habilitada no 'socket'."
839
840 #. type: Plain text
841 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
842 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
843 msgid ""
844 "To receive a I<struct ucred> message, the B<SO_PASSCRED> option must be "
845 "enabled on the socket."
846 msgstr ""
847
848 #. type: TP
849 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
850 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
851 #, no-wrap
852 msgid "B<SCM_SECURITY>"
853 msgstr "B<SCM_SECURITY>"
854
855 #. type: Plain text
856 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
857 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
858 msgid ""
859 "Receive the SELinux security context (the security label) of the peer "
860 "socket. The received ancillary data is a null-terminated string containing "
861 "the security context. The receiver should allocate at least B<NAME_MAX> "
862 "bytes in the data portion of the ancillary message for this data."
863 msgstr ""
864
865 #. type: Plain text
866 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
867 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
868 msgid ""
869 "To receive the security context, the B<SO_PASSSEC> option must be enabled on "
870 "the socket (see above)."
871 msgstr ""
872
873 #. type: Plain text
874 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
875 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
876 msgid ""
877 "When sending ancillary data with B<sendmsg>(2), only one item of each of the "
878 "above types may be included in the sent message."
879 msgstr ""
880
881 #. type: Plain text
882 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
883 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
884 msgid ""
885 "At least one byte of real data should be sent when sending ancillary data. "
886 "On Linux, this is required to successfully send ancillary data over a UNIX "
887 "domain stream socket. When sending ancillary data over a UNIX domain "
888 "datagram socket, it is not necessary on Linux to send any accompanying real "
889 "data. However, portable applications should also include at least one byte "
890 "of real data when sending ancillary data over a datagram socket."
891 msgstr ""
892
893 #. type: Plain text
894 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
895 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
896 msgid ""
897 "When receiving from a stream socket, ancillary data forms a kind of barrier "
898 "for the received data. For example, suppose that the sender transmits as "
899 "follows:"
900 msgstr ""
901
902 #. type: IP
903 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
904 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
905 #, no-wrap
906 msgid "(1)"
907 msgstr "(1)"
908
909 #. type: Plain text
910 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
911 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
912 msgid "B<sendmsg>(2) of four bytes, with no ancillary data."
913 msgstr ""
914
915 #. type: IP
916 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
917 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
918 #, no-wrap
919 msgid "(2)"
920 msgstr "(2)"
921
922 #. type: Plain text
923 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
924 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
925 msgid "B<sendmsg>(2) of one byte, with ancillary data."
926 msgstr ""
927
928 #. type: IP
929 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
930 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
931 #, no-wrap
932 msgid "(3)"
933 msgstr "(3)"
934
935 #. type: Plain text
936 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
937 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
938 msgid ""
939 "Suppose that the receiver now performs B<recvmsg>(2) calls each with a "
940 "buffer size of 20 bytes. The first call will receive five bytes of data, "
941 "along with the ancillary data sent by the second B<sendmsg>(2) call. The "
942 "next call will receive the remaining four bytes of data."
943 msgstr ""
944
945 #. type: Plain text
946 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
947 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
948 msgid ""
949 "If the space allocated for receiving incoming ancillary data is too small "
950 "then the ancillary data is truncated to the number of headers that will fit "
951 "in the supplied buffer (or, in the case of an B<SCM_RIGHTS> file descriptor "
952 "list, the list of file descriptors may be truncated). If no buffer is "
953 "provided for incoming ancillary data (i.e., the I<msg_control> field of the "
954 "I<msghdr> structure supplied to B<recvmsg>(2) is NULL), then the incoming "
955 "ancillary data is discarded. In both of these cases, the B<MSG_CTRUNC> flag "
956 "will be set in the I<msg.msg_flags> value returned by B<recvmsg>(2)."
957 msgstr ""
958
959 #. type: SS
960 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
961 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
962 #, no-wrap
963 msgid "Ioctls"
964 msgstr "Ioctls"
965
966 #. type: Plain text
967 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
968 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
969 msgid ""
970 "The following B<ioctl>(2) calls return information in I<value>. The "
971 "correct syntax is:"
972 msgstr ""
973
974 #. type: Plain text
975 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
976 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
977 #, no-wrap
978 msgid ""
979 "B<int>I< value>B<;>\n"
980 "I<error>B< = ioctl(>I<unix_socket>B<, >I<ioctl_type>B<, &>I<value>B<);>\n"
981 msgstr ""
982
983 #. type: Plain text
984 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
985 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
986 msgid "I<ioctl_type> can be:"
987 msgstr ""
988
989 #. type: TP
990 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
991 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
992 #, no-wrap
993 msgid "B<SIOCINQ>"
994 msgstr "B<SIOCINQ>"
995
996 #. #-#-#-#-# archlinux: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
997 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
998 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
999 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1000 #. quite what userland might expect. It seems to return the number
1001 #. of bytes allocated for buffers containing pending output.
1002 #. That number is normally larger than the number of bytes of pending
1003 #. output. Since this info is, from userland's point of view, imprecise,
1004 #. and it may well change, probably best not to document this now.
1005 #. type: Plain text
1006 #. #-#-#-#-# debian-trixie: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1007 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1008 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1009 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1010 #. quite what userland might expect. It seems to return the number
1011 #. of bytes allocated for buffers containing pending output.
1012 #. That number is normally larger than the number of bytes of pending
1013 #. output. Since this info is, from userland's point of view, imprecise,
1014 #. and it may well change, probably best not to document this now.
1015 #. type: Plain text
1016 #. #-#-#-#-# debian-unstable: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1017 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1018 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1019 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1020 #. quite what userland might expect. It seems to return the number
1021 #. of bytes allocated for buffers containing pending output.
1022 #. That number is normally larger than the number of bytes of pending
1023 #. output. Since this info is, from userland's point of view, imprecise,
1024 #. and it may well change, probably best not to document this now.
1025 #. type: Plain text
1026 #. #-#-#-#-# fedora-44: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1027 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1028 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1029 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1030 #. quite what userland might expect. It seems to return the number
1031 #. of bytes allocated for buffers containing pending output.
1032 #. That number is normally larger than the number of bytes of pending
1033 #. output. Since this info is, from userland's point of view, imprecise,
1034 #. and it may well change, probably best not to document this now.
1035 #. type: Plain text
1036 #. #-#-#-#-# fedora-rawhide: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1037 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1038 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1039 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1040 #. quite what userland might expect. It seems to return the number
1041 #. of bytes allocated for buffers containing pending output.
1042 #. That number is normally larger than the number of bytes of pending
1043 #. output. Since this info is, from userland's point of view, imprecise,
1044 #. and it may well change, probably best not to document this now.
1045 #. type: Plain text
1046 #. #-#-#-#-# mageia-cauldron: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1047 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1048 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1049 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1050 #. quite what userland might expect. It seems to return the number
1051 #. of bytes allocated for buffers containing pending output.
1052 #. That number is normally larger than the number of bytes of pending
1053 #. output. Since this info is, from userland's point of view, imprecise,
1054 #. and it may well change, probably best not to document this now.
1055 #. type: Plain text
1056 #. #-#-#-#-# opensuse-leap-16-1: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1057 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1058 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1059 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1060 #. quite what userland might expect. It seems to return the number
1061 #. of bytes allocated for buffers containing pending output.
1062 #. That number is normally larger than the number of bytes of pending
1063 #. output. Since this info is, from userland's point of view, imprecise,
1064 #. and it may well change, probably best not to document this now.
1065 #. type: Plain text
1066 #. #-#-#-#-# opensuse-tumbleweed: unix.7.pot (PACKAGE VERSION) #-#-#-#-#
1067 #. FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
1068 #. filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
1069 #. SIOCOUTQ also has an effect for UNIX domain sockets, but not
1070 #. quite what userland might expect. It seems to return the number
1071 #. of bytes allocated for buffers containing pending output.
1072 #. That number is normally larger than the number of bytes of pending
1073 #. output. Since this info is, from userland's point of view, imprecise,
1074 #. and it may well change, probably best not to document this now.
1075 #. type: Plain text
1076 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1077 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1078 msgid ""
1079 "For B<SOCK_STREAM> sockets, this call returns the number of unread bytes in "
1080 "the receive buffer. The socket must not be in LISTEN state, otherwise an "
1081 "error (B<EINVAL>) is returned. B<SIOCINQ> is defined in I<E<lt>linux/"
1082 "sockios.hE<gt>>. Alternatively, you can use the synonymous B<FIONREAD>, "
1083 "defined in I<E<lt>sys/ioctl.hE<gt>>. For B<SOCK_DGRAM> sockets, the "
1084 "returned value is the same as for Internet domain datagram sockets; see "
1085 "B<udp>(7)."
1086 msgstr ""
1087
1088 #. type: SH
1089 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1090 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1091 #, no-wrap
1092 msgid "ERRORS"
1093 msgstr "ERROS"
1094
1095 #. type: TP
1096 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1097 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1098 #, no-wrap
1099 msgid "B<EADDRINUSE>"
1100 msgstr "B<EADDRINUSE>"
1101
1102 #. type: Plain text
1103 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1104 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1105 #, fuzzy
1106 #| msgid ""
1107 #| "Selected local address is already taken or filesystem socket object "
1108 #| "already exists."
1109 msgid ""
1110 "The specified local address is already in use or the filesystem socket "
1111 "object already exists."
1112 msgstr ""
1113 "O endereço local selecionado já foi pego, ou o objeto de 'socket' do sistema "
1114 "de arquivo já existe."
1115
1116 #. type: TP
1117 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1118 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1119 #, no-wrap
1120 msgid "B<EBADF>"
1121 msgstr "B<EBADF>"
1122
1123 #. type: Plain text
1124 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1125 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1126 msgid ""
1127 "This error can occur for B<sendmsg>(2) when sending a file descriptor as "
1128 "ancillary data over a UNIX domain socket (see the description of "
1129 "B<SCM_RIGHTS>, above), and indicates that the file descriptor number that is "
1130 "being sent is not valid (e.g., it is not an open file descriptor)."
1131 msgstr ""
1132
1133 #. type: TP
1134 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1135 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1136 #, no-wrap
1137 msgid "B<ECONNREFUSED>"
1138 msgstr "B<ECONNREFUSED>"
1139
1140 #. type: Plain text
1141 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1142 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1143 msgid ""
1144 "The remote address specified by B<connect>(2) was not a listening socket. "
1145 "This error can also occur if the target pathname is not a socket."
1146 msgstr ""
1147
1148 #. type: TP
1149 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1150 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1151 #, no-wrap
1152 msgid "B<ECONNRESET>"
1153 msgstr "B<ECONNRESET>"
1154
1155 #. type: Plain text
1156 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1157 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1158 msgid "Remote socket was unexpectedly closed."
1159 msgstr "O 'socket' remoto foi encerrado inesperadamente."
1160
1161 #. type: TP
1162 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1163 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1164 #, no-wrap
1165 msgid "B<EFAULT>"
1166 msgstr "B<EFAULT>"
1167
1168 #. type: Plain text
1169 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1170 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1171 msgid "User memory address was not valid."
1172 msgstr "O endereço de memória do usuário não era válida."
1173
1174 #. type: TP
1175 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1176 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1177 #, no-wrap
1178 msgid "B<EINVAL>"
1179 msgstr "B<EINVAL>"
1180
1181 #. type: Plain text
1182 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1183 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1184 #, fuzzy
1185 #| msgid ""
1186 #| "Invalid argument passed. A common cause is the missing setting of AF_UNIX "
1187 #| "in the sun_type field of passed addresses or the socket being in an "
1188 #| "invalid state for the applied operation."
1189 msgid ""
1190 "Invalid argument passed. A common cause is that the value B<AF_UNIX> was "
1191 "not specified in the I<sun_type> field of passed addresses, or the socket "
1192 "was in an invalid state for the applied operation."
1193 msgstr ""
1194 "Um argumento inválido foi passado. Uma causa comum é a perda de configuração "
1195 "do AF_UNIX no campo sun_type do endereço passado, ou o 'socket' está em um "
1196 "estado inválido para a operação aplicada."
1197
1198 #. type: TP
1199 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1200 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1201 #, no-wrap
1202 msgid "B<EISCONN>"
1203 msgstr "B<EISCONN>"
1204
1205 #. type: Plain text
1206 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1207 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1208 msgid ""
1209 "B<connect>(2) called on an already connected socket or a target address was "
1210 "specified on a connected socket."
1211 msgstr ""
1212 "B<connect>(2) foi chamado em um 'socket' já conectado, ou um endereço-alvo "
1213 "foi especificado em um 'socket' conectado."
1214
1215 #. type: TP
1216 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1217 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1218 #, no-wrap
1219 msgid "B<ENFILE>"
1220 msgstr "B<ENFILE>"
1221
1222 #. type: Plain text
1223 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1224 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1225 msgid ""
1226 "The system-wide limit on the total number of open files has been reached."
1227 msgstr ""
1228 "O limite para todo o sistema no número total de arquivos abertos foi "
1229 "alcançado."
1230
1231 #. type: TP
1232 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1233 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1234 #, no-wrap
1235 msgid "B<ENOENT>"
1236 msgstr "B<ENOENT>"
1237
1238 #. type: Plain text
1239 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1240 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1241 msgid ""
1242 "The pathname in the remote address specified to B<connect>(2) did not exist."
1243 msgstr ""
1244
1245 #. type: TP
1246 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1247 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1248 #, no-wrap
1249 msgid "B<ENOMEM>"
1250 msgstr "B<ENOMEM>"
1251
1252 #. type: Plain text
1253 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1254 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1255 msgid "Out of memory."
1256 msgstr "Sem memória."
1257
1258 #. type: TP
1259 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1260 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1261 #, no-wrap
1262 msgid "B<ENOTCONN>"
1263 msgstr "B<ENOTCONN>"
1264
1265 #. type: Plain text
1266 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1267 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1268 msgid ""
1269 "Socket operation needs a target address, but the socket is not connected."
1270 msgstr ""
1271 "A operação de 'socket' precisa de um endereço-alvo, mas o 'socket' não está "
1272 "conectado."
1273
1274 #. type: TP
1275 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1276 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1277 #, no-wrap
1278 msgid "B<EOPNOTSUPP>"
1279 msgstr "B<EOPNOTSUPP>"
1280
1281 #. type: Plain text
1282 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1283 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1284 msgid ""
1285 "Stream operation called on non-stream oriented socket or tried to use the "
1286 "out-of-band data option."
1287 msgstr ""
1288 "Uma operação de fluxo foi chamada em um 'socket' não orientado ao fluxo, ou "
1289 "tentou usar uma opção de dados fora de banda."
1290
1291 #. type: TP
1292 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1293 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1294 #, no-wrap
1295 msgid "B<EPERM>"
1296 msgstr "B<EPERM>"
1297
1298 #. type: Plain text
1299 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1300 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1301 msgid "The sender passed invalid credentials in the I<struct ucred>."
1302 msgstr "O remetente passou credenciais inválidas na I<struct ucred>."
1303
1304 #. type: TP
1305 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1306 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1307 #, no-wrap
1308 msgid "B<EPIPE>"
1309 msgstr "B<EPIPE>"
1310
1311 #. type: Plain text
1312 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1313 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1314 msgid ""
1315 "Remote socket was closed on a stream socket. If enabled, a B<SIGPIPE> is "
1316 "sent as well. This can be avoided by passing the B<MSG_NOSIGNAL> flag to "
1317 "B<send>(2) or B<sendmsg>(2)."
1318 msgstr ""
1319 "O 'socket' remoto foi encerrado em um 'socket' de fluxo. Se habilitado, um "
1320 "B<SIGPIPE> é enviado também. Isto pode ser evitado pela passagem do "
1321 "sinalizador B<MSG_NOSIGNAL> para B<send>(2) ou para B<sendmsg>(2)."
1322
1323 #. type: TP
1324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1326 #, no-wrap
1327 msgid "B<EPROTONOSUPPORT>"
1328 msgstr "B<EPROTONOSUPPORT>"
1329
1330 #. type: Plain text
1331 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1332 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1333 msgid "Passed protocol is not B<AF_UNIX>."
1334 msgstr "O protocolo passado não é B<AF_UNIX>."
1335
1336 #. type: TP
1337 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1338 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1339 #, no-wrap
1340 msgid "B<EPROTOTYPE>"
1341 msgstr "B<EPROTOTYPE>"
1342
1343 #. type: Plain text
1344 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1345 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1346 msgid ""
1347 "Remote socket does not match the local socket type (B<SOCK_DGRAM> versus "
1348 "B<SOCK_STREAM>)."
1349 msgstr ""
1350 "O 'socket' remoto não encontra o tipo de 'socket' local (B<SOCK_DGRAM> vs. "
1351 "B<SOCK_STREAM>)."
1352
1353 #. type: TP
1354 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1355 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1356 #, no-wrap
1357 msgid "B<ESOCKTNOSUPPORT>"
1358 msgstr "B<ESOCKTNOSUPPORT>"
1359
1360 #. type: Plain text
1361 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1362 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1363 msgid "Unknown socket type."
1364 msgstr "Tipo de 'socket' desconhecido."
1365
1366 #. type: TP
1367 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1368 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1369 #, no-wrap
1370 msgid "B<ESRCH>"
1371 msgstr "B<ESRCH>"
1372
1373 #. type: Plain text
1374 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1375 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1376 msgid ""
1377 "While sending an ancillary message containing credentials "
1378 "(B<SCM_CREDENTIALS>), the caller specified a PID that does not match any "
1379 "existing process."
1380 msgstr ""
1381
1382 #. type: TP
1383 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1384 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1385 #, no-wrap
1386 msgid "B<ETOOMANYREFS>"
1387 msgstr "B<ETOOMANYREFS>"
1388
1389 #. type: Plain text
1390 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1391 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1392 msgid ""
1393 "This error can occur for B<sendmsg>(2) when sending a file descriptor as "
1394 "ancillary data over a UNIX domain socket (see the description of "
1395 "B<SCM_RIGHTS>, above). It occurs if the number of \"in-flight\" file "
1396 "descriptors exceeds the B<RLIMIT_NOFILE> resource limit and the caller does "
1397 "not have the B<CAP_SYS_RESOURCE> capability. An in-flight file descriptor "
1398 "is one that has been sent using B<sendmsg>(2) but has not yet been accepted "
1399 "in the recipient process using B<recvmsg>(2)."
1400 msgstr ""
1401
1402 #. commit 712f4aad406bb1ed67f3f98d04c044191f0ff593
1403 #. type: Plain text
1404 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1405 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1406 msgid ""
1407 "This error is diagnosed since mainline Linux 4.5 (and in some earlier kernel "
1408 "versions where the fix has been backported). In earlier kernel versions, it "
1409 "was possible to place an unlimited number of file descriptors in flight, by "
1410 "sending each file descriptor with B<sendmsg>(2) and then closing the file "
1411 "descriptor so that it was not accounted against the B<RLIMIT_NOFILE> "
1412 "resource limit."
1413 msgstr ""
1414
1415 #. type: Plain text
1416 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1417 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1418 msgid ""
1419 "Other errors can be generated by the generic socket layer or by the "
1420 "filesystem while generating a filesystem socket object. See the appropriate "
1421 "manual pages for more information."
1422 msgstr ""
1423 "Outros erros podem ser gerados pela camada genérica de 'sockets' ou pelo "
1424 "sistema de arquivos, enquanto geram um objeto de 'socket' do sistema de "
1425 "arquivos. Veja as páginas de manual apropriadas para maiores informações."
1426
1427 #. type: SH
1428 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1429 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1430 #, no-wrap
1431 msgid "VERSIONS"
1432 msgstr "VERSÕES"
1433
1434 #. type: Plain text
1435 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1436 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1437 #, fuzzy
1438 #| msgid ""
1439 #| "B<SCM_CREDENTIALS> and the abstract namespace were introduced with Linux "
1440 #| "2.2 and should not be used in portable programs."
1441 msgid ""
1442 "B<SCM_CREDENTIALS> and the abstract namespace were introduced with Linux 2.2 "
1443 "and should not be used in portable programs. (Some BSD-derived systems also "
1444 "support credential passing, but the implementation details differ.)"
1445 msgstr ""
1446 "B<SCM_CREDENTIALS> e o espaço de nomes abstrato foram introduzidos com o "
1447 "Linux 2.2 e não deve ser usados em programas portáveis."
1448
1449 #. type: SH
1450 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1451 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1452 #, no-wrap
1453 msgid "NOTES"
1454 msgstr "NOTAS"
1455
1456 #. type: Plain text
1457 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1458 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1459 msgid ""
1460 "Binding to a socket with a filename creates a socket in the filesystem that "
1461 "must be deleted by the caller when it is no longer needed (using "
1462 "B<unlink>(2)). The usual UNIX close-behind semantics apply; the socket can "
1463 "be unlinked at any time and will be finally removed from the filesystem when "
1464 "the last reference to it is closed."
1465 msgstr ""
1466 "Ligar-se a um 'socket' com um nome de arquivo cria um 'socket' no sistema de "
1467 "arquivos que precisa ser deletado por que chama quando ele não for mais "
1468 "necessário (usando-se B<unlink>(2)). Aplica-se a semântica \"fecha para "
1469 "trás\" normal do UNIX; o 'socket' pode ser desligado a qualquer momento, e "
1470 "será finalmente removido do sistema de arquivos quando a última referência a "
1471 "ele for encerrada."
1472
1473 #. type: Plain text
1474 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1475 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1476 msgid ""
1477 "To pass file descriptors or credentials over a B<SOCK_STREAM> socket, you "
1478 "must send or receive at least one byte of nonancillary data in the same "
1479 "B<sendmsg>(2) or B<recvmsg>(2) call."
1480 msgstr ""
1481
1482 #. type: Plain text
1483 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1484 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1485 msgid ""
1486 "UNIX domain stream sockets do not support the notion of out-of-band data."
1487 msgstr ""
1488
1489 #. type: SH
1490 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1491 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1492 #, no-wrap
1493 msgid "BUGS"
1494 msgstr "BUGS"
1495
1496 #. The behavior on Solaris is quite similar.
1497 #. type: Plain text
1498 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1499 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1500 msgid ""
1501 "When binding a socket to an address, Linux is one of the implementations "
1502 "that append a null terminator if none is supplied in I<sun_path>. In most "
1503 "cases this is unproblematic: when the socket address is retrieved, it will "
1504 "be one byte longer than that supplied when the socket was bound. However, "
1505 "there is one case where confusing behavior can result: if 108 non-null bytes "
1506 "are supplied when a socket is bound, then the addition of the null "
1507 "terminator takes the length of the pathname beyond I<sizeof(sun_path)>. "
1508 "Consequently, when retrieving the socket address (for example, via "
1509 "B<accept>(2)), if the input I<addrlen> argument for the retrieving call is "
1510 "specified as I<sizeof(struct sockaddr_un)>, then the returned address "
1511 "structure I<won't> have a null terminator in I<sun_path>."
1512 msgstr ""
1513
1514 #. i.e., traditional BSD
1515 #. type: Plain text
1516 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1517 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1518 msgid ""
1519 "In addition, some implementations don't require a null terminator when "
1520 "binding a socket (the I<addrlen> argument is used to determine the length of "
1521 "I<sun_path>) and when the socket address is retrieved on these "
1522 "implementations, there is no null terminator in I<sun_path>."
1523 msgstr ""
1524
1525 #. type: Plain text
1526 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1527 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1528 msgid ""
1529 "Applications that retrieve socket addresses can (portably) code to handle "
1530 "the possibility that there is no null terminator in I<sun_path> by "
1531 "respecting the fact that the number of valid bytes in the pathname is:"
1532 msgstr ""
1533
1534 #. type: Plain text
1535 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1536 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1537 #, no-wrap
1538 msgid "strnlen(addr.sun_path, addrlen - offsetof(sockaddr_un, sun_path))\n"
1539 msgstr ""
1540
1541 #. type: Plain text
1542 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1543 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1544 msgid ""
1545 "Alternatively, an application can retrieve the socket address by allocating "
1546 "a buffer of size I<sizeof(struct sockaddr_un)+1> that is zeroed out before "
1547 "the retrieval. The retrieving call can specify I<addrlen> as "
1548 "I<sizeof(struct sockaddr_un)>, and the extra zero byte ensures that there "
1549 "will be a null terminator for the string returned in I<sun_path>:"
1550 msgstr ""
1551
1552 #. type: Plain text
1553 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1554 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1555 #, no-wrap
1556 msgid ""
1557 "void *addrp;\n"
1558 "\\&\n"
1559 "addrlen = sizeof(struct sockaddr_un);\n"
1560 "addrp = malloc(addrlen + 1);\n"
1561 "if (addrp == NULL)\n"
1562 " /* Handle error */ ;\n"
1563 "memset(addrp, 0, addrlen + 1);\n"
1564 "\\&\n"
1565 "if (getsockname(sfd, (struct sockaddr *) addrp, &addrlen)) == -1)\n"
1566 " /* handle error */ ;\n"
1567 "\\&\n"
1568 "printf(\"sun_path = %s\\[rs]n\", ((struct sockaddr_un *) addrp)-E<gt>sun_path);\n"
1569 msgstr ""
1570
1571 #. type: Plain text
1572 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1573 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1574 msgid ""
1575 "This sort of messiness can be avoided if it is guaranteed that the "
1576 "applications that I<create> pathname sockets follow the rules outlined above "
1577 "under I<Pathname sockets>."
1578 msgstr ""
1579
1580 #. type: SH
1581 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1582 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1583 #, no-wrap
1584 msgid "EXAMPLES"
1585 msgstr "EXEMPLOS"
1586
1587 #. type: Plain text
1588 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1589 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1590 msgid ""
1591 "The following code demonstrates the use of sequenced-packet sockets for "
1592 "local interprocess communication. It consists of two programs. The server "
1593 "program waits for a connection from the client program. The client sends "
1594 "each of its command-line arguments in separate messages. The server treats "
1595 "the incoming messages as integers and adds them up. The client sends the "
1596 "command string \"END\". The server sends back a message containing the sum "
1597 "of the client's integers. The client prints the sum and exits. The server "
1598 "waits for the next client to connect. To stop the server, the client is "
1599 "called with the command-line argument \"DOWN\"."
1600 msgstr ""
1601
1602 #. type: Plain text
1603 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1604 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1605 msgid ""
1606 "The following output was recorded while running the server in the background "
1607 "and repeatedly executing the client. Execution of the server program ends "
1608 "when it receives the \"DOWN\" command."
1609 msgstr ""
1610
1611 #. type: SS
1612 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1613 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1614 #, no-wrap
1615 msgid "Example output"
1616 msgstr ""
1617
1618 #. type: Plain text
1619 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1620 #: opensuse-tumbleweed
1621 #, fuzzy, no-wrap
1622 #| msgid ""
1623 #| "$ B<./server &>\n"
1624 #| "[1] 25887\n"
1625 #| "$ B<./client 3 4>\n"
1626 #| "Result = 7\n"
1627 #| "$ B<./client 11 -5>\n"
1628 #| "Result = 6\n"
1629 #| "$ B<./client DOWN>\n"
1630 #| "Result = 0\n"
1631 #| "[1]+ Done ./server\n"
1632 #| "$\n"
1633 msgid ""
1634 "$B< ./server &>\n"
1635 "[1] 25887\n"
1636 "$B< ./client 3 4>;\n"
1637 "Result = 7\n"
1638 "$B< ./client 11 -5>;\n"
1639 "Result = 6\n"
1640 "$B< ./client DOWN>;\n"
1641 "Result = 0\n"
1642 "[1]+ Done ./server\n"
1643 "$\n"
1644 msgstr ""
1645 "$ B<./server &>\n"
1646 "[1] 25887\n"
1647 "$ B<./client 3 4>\n"
1648 "Result = 7\n"
1649 "$ B<./client 11 -5>\n"
1650 "Result = 6\n"
1651 "$ B<./client DOWN>\n"
1652 "Result = 0\n"
1653 "[1]+ Done ./server\n"
1654 "$\n"
1655
1656 #. type: SS
1657 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1658 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1659 #, no-wrap
1660 msgid "Program source"
1661 msgstr "Fonte do programa"
1662
1663 #. type: Plain text
1664 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1665 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1666 #, fuzzy, no-wrap
1667 #| msgid ""
1668 #| "#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n"
1669 #| "#define BUFFER_SIZE 12\n"
1670 msgid ""
1671 "/*\n"
1672 " * File connection.h\n"
1673 " */\n"
1674 "#ifndef CONNECTION_H\n"
1675 "#define CONNECTION_H\n"
1676 "\\&\n"
1677 "#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n"
1678 "#define BUFFER_SIZE 12\n"
1679 "\\&\n"
1680 "#endif // include guard\n"
1681 msgstr ""
1682 "#define SOCKET_NAME \"/tmp/9Lq7BNBnBycd6nxy.socket\"\n"
1683 "#define BUFFER_SIZE 12\n"
1684
1685 #. type: Plain text
1686 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1687 #: opensuse-tumbleweed
1688 #, no-wrap
1689 msgid ""
1690 "/*\n"
1691 " * File server.c\n"
1692 " */\n"
1693 "\\&\n"
1694 "#include E<lt>stdio.hE<gt>\n"
1695 "#include E<lt>stdlib.hE<gt>\n"
1696 "#include E<lt>string.hE<gt>\n"
1697 "#include E<lt>sys/socket.hE<gt>\n"
1698 "#include E<lt>sys/types.hE<gt>\n"
1699 "#include E<lt>sys/un.hE<gt>\n"
1700 "#include E<lt>unistd.hE<gt>\n"
1701 "\\&\n"
1702 "#include \"connection.h\"\n"
1703 "\\&\n"
1704 "int\n"
1705 "main(void)\n"
1706 "{\n"
1707 " int down_flag = 0;\n"
1708 " int ret;\n"
1709 " int connection_socket;\n"
1710 " int data_socket;\n"
1711 " int result;\n"
1712 " ssize_t r, w;\n"
1713 " struct sockaddr_un name;\n"
1714 " char buffer[BUFFER_SIZE];\n"
1715 "\\&\n"
1716 " /* Create local socket. */\n"
1717 "\\&\n"
1718 " connection_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n"
1719 " if (connection_socket == -1) {\n"
1720 " perror(\"socket\");\n"
1721 " exit(EXIT_FAILURE);\n"
1722 " }\n"
1723 "\\&\n"
1724 " /*\n"
1725 " * For portability clear the whole structure, since some\n"
1726 " * implementations have additional (nonstandard) fields in\n"
1727 " * the structure.\n"
1728 " */\n"
1729 "\\&\n"
1730 " memset(&name, 0, sizeof(name));\n"
1731 "\\&\n"
1732 " /* Bind socket to socket name. */\n"
1733 "\\&\n"
1734 " name.sun_family = AF_UNIX;\n"
1735 " strncpy(name.sun_path, SOCKET_NAME, sizeof(name.sun_path) - 1);\n"
1736 "\\&\n"
1737 " ret = bind(connection_socket, (const struct sockaddr *) &name,\n"
1738 " sizeof(name));\n"
1739 " if (ret == -1) {\n"
1740 " perror(\"bind\");\n"
1741 " exit(EXIT_FAILURE);\n"
1742 " }\n"
1743 "\\&\n"
1744 " /*\n"
1745 " * Prepare for accepting connections. The backlog size is set\n"
1746 " * to 20. So while one request is being processed other requests\n"
1747 " * can be waiting.\n"
1748 " */\n"
1749 "\\&\n"
1750 " ret = listen(connection_socket, 20);\n"
1751 " if (ret == -1) {\n"
1752 " perror(\"listen\");\n"
1753 " exit(EXIT_FAILURE);\n"
1754 " }\n"
1755 "\\&\n"
1756 " /* This is the main loop for handling connections. */\n"
1757 "\\&\n"
1758 " for (;;) {\n"
1759 "\\&\n"
1760 " /* Wait for incoming connection. */\n"
1761 "\\&\n"
1762 " data_socket = accept(connection_socket, NULL, NULL);\n"
1763 " if (data_socket == -1) {\n"
1764 " perror(\"accept\");\n"
1765 " exit(EXIT_FAILURE);\n"
1766 " }\n"
1767 "\\&\n"
1768 " result = 0;\n"
1769 " for (;;) {\n"
1770 "\\&\n"
1771 " /* Wait for next data packet. */\n"
1772 "\\&\n"
1773 " r = read(data_socket, buffer, sizeof(buffer));\n"
1774 " if (r == -1) {\n"
1775 " perror(\"read\");\n"
1776 " exit(EXIT_FAILURE);\n"
1777 " }\n"
1778 "\\&\n"
1779 " /* Ensure buffer is 0-terminated. */\n"
1780 "\\&\n"
1781 " buffer[sizeof(buffer) - 1] = 0;\n"
1782 "\\&\n"
1783 " /* Handle commands. */\n"
1784 "\\&\n"
1785 " if (!strncmp(buffer, \"DOWN\", sizeof(buffer))) {\n"
1786 " down_flag = 1;\n"
1787 " continue;\n"
1788 " }\n"
1789 "\\&\n"
1790 " if (!strncmp(buffer, \"END\", sizeof(buffer))) {\n"
1791 " break;\n"
1792 " }\n"
1793 "\\&\n"
1794 " if (down_flag) {\n"
1795 " continue;\n"
1796 " }\n"
1797 "\\&\n"
1798 " /* Add received summand. */\n"
1799 "\\&\n"
1800 " result += atoi(buffer);\n"
1801 " }\n"
1802 "\\&\n"
1803 " /* Send result. */\n"
1804 "\\&\n"
1805 " sprintf(buffer, \"%d\", result);\n"
1806 " w = write(data_socket, buffer, sizeof(buffer));\n"
1807 " if (w == -1) {\n"
1808 " perror(\"write\");\n"
1809 " exit(EXIT_FAILURE);\n"
1810 " }\n"
1811 "\\&\n"
1812 " /* Close socket. */\n"
1813 "\\&\n"
1814 " close(data_socket);\n"
1815 "\\&\n"
1816 " /* Quit on DOWN command. */\n"
1817 "\\&\n"
1818 " if (down_flag) {\n"
1819 " break;\n"
1820 " }\n"
1821 " }\n"
1822 "\\&\n"
1823 " close(connection_socket);\n"
1824 "\\&\n"
1825 " /* Unlink the socket. */\n"
1826 "\\&\n"
1827 " unlink(SOCKET_NAME);\n"
1828 "\\&\n"
1829 " exit(EXIT_SUCCESS);\n"
1830 "}\n"
1831 msgstr ""
1832
1833 #. type: Plain text
1834 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
1835 #: opensuse-tumbleweed
1836 #, no-wrap
1837 msgid ""
1838 "/*\n"
1839 " * File client.c\n"
1840 " */\n"
1841 "\\&\n"
1842 "#include E<lt>stdio.hE<gt>\n"
1843 "#include E<lt>stdlib.hE<gt>\n"
1844 "#include E<lt>string.hE<gt>\n"
1845 "#include E<lt>sys/socket.hE<gt>\n"
1846 "#include E<lt>sys/types.hE<gt>\n"
1847 "#include E<lt>sys/un.hE<gt>\n"
1848 "#include E<lt>unistd.hE<gt>\n"
1849 "\\&\n"
1850 "#include \"connection.h\"\n"
1851 "\\&\n"
1852 "int\n"
1853 "main(int argc, char *argv[])\n"
1854 "{\n"
1855 " int ret;\n"
1856 " int data_socket;\n"
1857 " ssize_t r, w;\n"
1858 " struct sockaddr_un addr;\n"
1859 " char buffer[BUFFER_SIZE];\n"
1860 "\\&\n"
1861 " /* Create local socket. */\n"
1862 "\\&\n"
1863 " data_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n"
1864 " if (data_socket == -1) {\n"
1865 " perror(\"socket\");\n"
1866 " exit(EXIT_FAILURE);\n"
1867 " }\n"
1868 "\\&\n"
1869 " /*\n"
1870 " * For portability clear the whole structure, since some\n"
1871 " * implementations have additional (nonstandard) fields in\n"
1872 " * the structure.\n"
1873 " */\n"
1874 "\\&\n"
1875 " memset(&addr, 0, sizeof(addr));\n"
1876 "\\&\n"
1877 " /* Connect socket to socket address. */\n"
1878 "\\&\n"
1879 " addr.sun_family = AF_UNIX;\n"
1880 " strncpy(addr.sun_path, SOCKET_NAME, sizeof(addr.sun_path) - 1);\n"
1881 "\\&\n"
1882 " ret = connect(data_socket, (const struct sockaddr *) &addr,\n"
1883 " sizeof(addr));\n"
1884 " if (ret == -1) {\n"
1885 " fprintf(stderr, \"The server is down.\\[rs]n\");\n"
1886 " exit(EXIT_FAILURE);\n"
1887 " }\n"
1888 "\\&\n"
1889 " /* Send arguments. */\n"
1890 "\\&\n"
1891 " for (int i = 1; i E<lt> argc; ++i) {\n"
1892 " w = write(data_socket, argv[i], strlen(argv[i]) + 1);\n"
1893 " if (w == -1) {\n"
1894 " perror(\"write\");\n"
1895 " break;\n"
1896 " }\n"
1897 " }\n"
1898 "\\&\n"
1899 " /* Request result. */\n"
1900 "\\&\n"
1901 " strcpy(buffer, \"END\");\n"
1902 " w = write(data_socket, buffer, strlen(buffer) + 1);\n"
1903 " if (w == -1) {\n"
1904 " perror(\"write\");\n"
1905 " exit(EXIT_FAILURE);\n"
1906 " }\n"
1907 "\\&\n"
1908 " /* Receive result. */\n"
1909 "\\&\n"
1910 " r = read(data_socket, buffer, sizeof(buffer));\n"
1911 " if (r == -1) {\n"
1912 " perror(\"read\");\n"
1913 " exit(EXIT_FAILURE);\n"
1914 " }\n"
1915 "\\&\n"
1916 " /* Ensure buffer is 0-terminated. */\n"
1917 "\\&\n"
1918 " buffer[sizeof(buffer) - 1] = 0;\n"
1919 "\\&\n"
1920 " printf(\"Result = %s\\[rs]n\", buffer);\n"
1921 "\\&\n"
1922 " /* Close socket. */\n"
1923 "\\&\n"
1924 " close(data_socket);\n"
1925 "\\&\n"
1926 " exit(EXIT_SUCCESS);\n"
1927 "}\n"
1928 msgstr ""
1929
1930 #. type: Plain text
1931 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1932 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1933 msgid ""
1934 "For examples of the use of B<SCM_RIGHTS>, see B<cmsg>(3) and "
1935 "B<seccomp_unotify>(2)."
1936 msgstr ""
1937
1938 #. type: SH
1939 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1940 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1941 #, no-wrap
1942 msgid "SEE ALSO"
1943 msgstr "VEJA TAMBÉM"
1944
1945 #. type: Plain text
1946 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
1947 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
1948 msgid ""
1949 "B<recvmsg>(2), B<sendmsg>(2), B<socket>(2), B<socketpair>(2), B<cmsg>(3), "
1950 "B<capabilities>(7), B<credentials>(7), B<socket>(7), B<udp>(7)"
1951 msgstr ""
1952 "B<recvmsg>(2), B<sendmsg>(2), B<socket>(2), B<socketpair>(2), B<cmsg>(3), "
1953 "B<capabilities>(7), B<credentials>(7), B<socket>(7), B<udp>(7)"
1954
1955 #. type: TH
1956 #: debian-trixie fedora-44 fedora-rawhide
1957 #, no-wrap
1958 msgid "2024-06-15"
1959 msgstr "15 junho 2024"
1960
1961 #. type: TH
1962 #: debian-trixie
1963 #, no-wrap
1964 msgid "Linux man-pages 6.9.1"
1965 msgstr "Linux man-pages 6.9.1"
1966
1967 #. type: TP
1968 #: debian-trixie fedora-44 fedora-rawhide
1969 #, no-wrap
1970 msgid "B<SO_PEERSEC>"
1971 msgstr "B<SO_PEERSEC>"
1972
1973 #. type: Plain text
1974 #: debian-trixie fedora-44 fedora-rawhide
1975 msgid ""
1976 "This read-only socket option returns the security context of the peer socket "
1977 "connected to this socket. By default, this will be the same as the security "
1978 "context of the process that created the peer socket unless overridden by the "
1979 "policy or by a process with the required permissions."
1980 msgstr ""
1981
1982 #. type: Plain text
1983 #: debian-trixie fedora-44 fedora-rawhide
1984 msgid ""
1985 "The argument to B<getsockopt>(2) is a pointer to a buffer of the specified "
1986 "length in bytes into which the security context string will be copied. If "
1987 "the buffer length is less than the length of the security context string, "
1988 "then B<getsockopt>(2) returns -1, sets I<errno> to B<ERANGE>, and returns "
1989 "the required length via I<optlen>. The caller should allocate at least "
1990 "B<NAME_MAX> bytes for the buffer initially, although this is not guaranteed "
1991 "to be sufficient. Resizing the buffer to the returned length and retrying "
1992 "may be necessary."
1993 msgstr ""
1994
1995 #. type: Plain text
1996 #: debian-trixie fedora-44 fedora-rawhide
1997 msgid ""
1998 "The security context string may include a terminating null character in the "
1999 "returned length, but is not guaranteed to do so: a security context \"foo\" "
2000 "might be represented as either {'f','o','o'} of length 3 or "
2001 "{'f','o','o','\\e0'} of length 4, which are considered to be "
2002 "interchangeable. The string is printable, does not contain non-terminating "
2003 "null characters, and is in an unspecified encoding (in particular, it is not "
2004 "guaranteed to be ASCII or UTF-8)."
2005 msgstr ""
2006
2007 #. commit 0b811db2cb2aabc910e53d34ebb95a15997c33e7
2008 #. type: Plain text
2009 #: debian-trixie fedora-44 fedora-rawhide
2010 msgid ""
2011 "The use of this option for sockets in the B<AF_UNIX> address family is "
2012 "supported since Linux 2.6.2 for connected stream sockets, and since Linux "
2013 "4.18 also for stream and datagram socket pairs created using "
2014 "B<socketpair>(2)."
2015 msgstr ""
2016
2017 #. type: Plain text
2018 #: debian-trixie fedora-44 fedora-rawhide
2019 #, no-wrap
2020 msgid ""
2021 "$ B<./server &>\n"
2022 "[1] 25887\n"
2023 "$ B<./client 3 4>\n"
2024 "Result = 7\n"
2025 "$ B<./client 11 -5>\n"
2026 "Result = 6\n"
2027 "$ B<./client DOWN>\n"
2028 "Result = 0\n"
2029 "[1]+ Done ./server\n"
2030 "$\n"
2031 msgstr ""
2032 "$ B<./server &>\n"
2033 "[1] 25887\n"
2034 "$ B<./client 3 4>\n"
2035 "Result = 7\n"
2036 "$ B<./client 11 -5>\n"
2037 "Result = 6\n"
2038 "$ B<./client DOWN>\n"
2039 "Result = 0\n"
2040 "[1]+ Done ./server\n"
2041 "$\n"
2042
2043 #. type: Plain text
2044 #: debian-trixie fedora-44 fedora-rawhide
2045 #, no-wrap
2046 msgid ""
2047 "/*\n"
2048 " * File server.c\n"
2049 " */\n"
2050 "\\&\n"
2051 "#include E<lt>stdio.hE<gt>\n"
2052 "#include E<lt>stdlib.hE<gt>\n"
2053 "#include E<lt>string.hE<gt>\n"
2054 "#include E<lt>sys/socket.hE<gt>\n"
2055 "#include E<lt>sys/types.hE<gt>\n"
2056 "#include E<lt>sys/un.hE<gt>\n"
2057 "#include E<lt>unistd.hE<gt>\n"
2058 "\\&\n"
2059 "#include \"connection.h\"\n"
2060 "\\&\n"
2061 "int\n"
2062 "main(void)\n"
2063 "{\n"
2064 " int down_flag = 0;\n"
2065 " int ret;\n"
2066 " int connection_socket;\n"
2067 " int data_socket;\n"
2068 " int result;\n"
2069 " ssize_t r, w;\n"
2070 " struct sockaddr_un name;\n"
2071 " char buffer[BUFFER_SIZE];\n"
2072 "\\&\n"
2073 " /* Create local socket. */\n"
2074 "\\&\n"
2075 " connection_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n"
2076 " if (connection_socket == -1) {\n"
2077 " perror(\"socket\");\n"
2078 " exit(EXIT_FAILURE);\n"
2079 " }\n"
2080 "\\&\n"
2081 " /*\n"
2082 " * For portability clear the whole structure, since some\n"
2083 " * implementations have additional (nonstandard) fields in\n"
2084 " * the structure.\n"
2085 " */\n"
2086 "\\&\n"
2087 " memset(&name, 0, sizeof(name));\n"
2088 "\\&\n"
2089 " /* Bind socket to socket name. */\n"
2090 "\\&\n"
2091 " name.sun_family = AF_UNIX;\n"
2092 " strncpy(name.sun_path, SOCKET_NAME, sizeof(name.sun_path) - 1);\n"
2093 "\\&\n"
2094 " ret = bind(connection_socket, (const struct sockaddr *) &name,\n"
2095 " sizeof(name));\n"
2096 " if (ret == -1) {\n"
2097 " perror(\"bind\");\n"
2098 " exit(EXIT_FAILURE);\n"
2099 " }\n"
2100 "\\&\n"
2101 " /*\n"
2102 " * Prepare for accepting connections. The backlog size is set\n"
2103 " * to 20. So while one request is being processed other requests\n"
2104 " * can be waiting.\n"
2105 " */\n"
2106 "\\&\n"
2107 " ret = listen(connection_socket, 20);\n"
2108 " if (ret == -1) {\n"
2109 " perror(\"listen\");\n"
2110 " exit(EXIT_FAILURE);\n"
2111 " }\n"
2112 "\\&\n"
2113 " /* This is the main loop for handling connections. */\n"
2114 "\\&\n"
2115 " for (;;) {\n"
2116 "\\&\n"
2117 " /* Wait for incoming connection. */\n"
2118 "\\&\n"
2119 " data_socket = accept(connection_socket, NULL, NULL);\n"
2120 " if (data_socket == -1) {\n"
2121 " perror(\"accept\");\n"
2122 " exit(EXIT_FAILURE);\n"
2123 " }\n"
2124 "\\&\n"
2125 " result = 0;\n"
2126 " for (;;) {\n"
2127 "\\&\n"
2128 " /* Wait for next data packet. */\n"
2129 "\\&\n"
2130 " r = read(data_socket, buffer, sizeof(buffer));\n"
2131 " if (r == -1) {\n"
2132 " perror(\"read\");\n"
2133 " exit(EXIT_FAILURE);\n"
2134 " }\n"
2135 "\\&\n"
2136 " /* Ensure buffer is 0-terminated. */\n"
2137 "\\&\n"
2138 " buffer[sizeof(buffer) - 1] = 0;\n"
2139 "\\&\n"
2140 " /* Handle commands. */\n"
2141 "\\&\n"
2142 " if (!strncmp(buffer, \"DOWN\", sizeof(buffer))) {\n"
2143 " down_flag = 1;\n"
2144 " continue;\n"
2145 " }\n"
2146 "\\&\n"
2147 " if (!strncmp(buffer, \"END\", sizeof(buffer))) {\n"
2148 " break;\n"
2149 " }\n"
2150 "\\&\n"
2151 " if (down_flag) {\n"
2152 " continue;\n"
2153 " }\n"
2154 "\\&\n"
2155 " /* Add received summand. */\n"
2156 "\\&\n"
2157 " result += atoi(buffer);\n"
2158 " }\n"
2159 "\\&\n"
2160 " /* Send result. */\n"
2161 "\\&\n"
2162 " sprintf(buffer, \"%d\", result);\n"
2163 " w = write(data_socket, buffer, sizeof(buffer));\n"
2164 " if (w == -1) {\n"
2165 " perror(\"write\");\n"
2166 " exit(EXIT_FAILURE);\n"
2167 " }\n"
2168 "\\&\n"
2169 " /* Close socket. */\n"
2170 "\\&\n"
2171 " close(data_socket);\n"
2172 "\\&\n"
2173 " /* Quit on DOWN command. */\n"
2174 "\\&\n"
2175 " if (down_flag) {\n"
2176 " break;\n"
2177 " }\n"
2178 " }\n"
2179 "\\&\n"
2180 " close(connection_socket);\n"
2181 "\\&\n"
2182 " /* Unlink the socket. */\n"
2183 "\\&\n"
2184 " unlink(SOCKET_NAME);\n"
2185 "\\&\n"
2186 " exit(EXIT_SUCCESS);\n"
2187 "}\n"
2188 msgstr ""
2189
2190 #. type: Plain text
2191 #: debian-trixie fedora-44 fedora-rawhide
2192 #, no-wrap
2193 msgid ""
2194 "/*\n"
2195 " * File client.c\n"
2196 " */\n"
2197 "\\&\n"
2198 "#include E<lt>stdio.hE<gt>\n"
2199 "#include E<lt>stdlib.hE<gt>\n"
2200 "#include E<lt>string.hE<gt>\n"
2201 "#include E<lt>sys/socket.hE<gt>\n"
2202 "#include E<lt>sys/types.hE<gt>\n"
2203 "#include E<lt>sys/un.hE<gt>\n"
2204 "#include E<lt>unistd.hE<gt>\n"
2205 "\\&\n"
2206 "#include \"connection.h\"\n"
2207 "\\&\n"
2208 "int\n"
2209 "main(int argc, char *argv[])\n"
2210 "{\n"
2211 " int ret;\n"
2212 " int data_socket;\n"
2213 " ssize_t r, w;\n"
2214 " struct sockaddr_un addr;\n"
2215 " char buffer[BUFFER_SIZE];\n"
2216 "\\&\n"
2217 " /* Create local socket. */\n"
2218 "\\&\n"
2219 " data_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);\n"
2220 " if (data_socket == -1) {\n"
2221 " perror(\"socket\");\n"
2222 " exit(EXIT_FAILURE);\n"
2223 " }\n"
2224 "\\&\n"
2225 " /*\n"
2226 " * For portability clear the whole structure, since some\n"
2227 " * implementations have additional (nonstandard) fields in\n"
2228 " * the structure.\n"
2229 " */\n"
2230 "\\&\n"
2231 " memset(&addr, 0, sizeof(addr));\n"
2232 "\\&\n"
2233 " /* Connect socket to socket address. */\n"
2234 "\\&\n"
2235 " addr.sun_family = AF_UNIX;\n"
2236 " strncpy(addr.sun_path, SOCKET_NAME, sizeof(addr.sun_path) - 1);\n"
2237 "\\&\n"
2238 " ret = connect(data_socket, (const struct sockaddr *) &addr,\n"
2239 " sizeof(addr));\n"
2240 " if (ret == -1) {\n"
2241 " fprintf(stderr, \"The server is down.\\[rs]n\");\n"
2242 " exit(EXIT_FAILURE);\n"
2243 " }\n"
2244 "\\&\n"
2245 " /* Send arguments. */\n"
2246 "\\&\n"
2247 " for (int i = 1; i E<lt> argc; ++i) {\n"
2248 " w = write(data_socket, argv[i], strlen(argv[i]) + 1);\n"
2249 " if (w == -1) {\n"
2250 " perror(\"write\");\n"
2251 " break;\n"
2252 " }\n"
2253 " }\n"
2254 "\\&\n"
2255 " /* Request result. */\n"
2256 "\\&\n"
2257 " strcpy(buffer, \"END\");\n"
2258 " w = write(data_socket, buffer, strlen(buffer) + 1);\n"
2259 " if (w == -1) {\n"
2260 " perror(\"write\");\n"
2261 " exit(EXIT_FAILURE);\n"
2262 " }\n"
2263 "\\&\n"
2264 " /* Receive result. */\n"
2265 "\\&\n"
2266 " r = read(data_socket, buffer, sizeof(buffer));\n"
2267 " if (r == -1) {\n"
2268 " perror(\"read\");\n"
2269 " exit(EXIT_FAILURE);\n"
2270 " }\n"
2271 "\\&\n"
2272 " /* Ensure buffer is 0-terminated. */\n"
2273 "\\&\n"
2274 " buffer[sizeof(buffer) - 1] = 0;\n"
2275 "\\&\n"
2276 " printf(\"Result = %s\\[rs]n\", buffer);\n"
2277 "\\&\n"
2278 " /* Close socket. */\n"
2279 "\\&\n"
2280 " close(data_socket);\n"
2281 "\\&\n"
2282 " exit(EXIT_SUCCESS);\n"
2283 "}\n"
2284 msgstr ""
2285
2286 #. type: TH
2287 #: fedora-44 fedora-rawhide
2288 #, no-wrap
2289 msgid "Linux man-pages 6.13"
2290 msgstr "Linux man-pages 6.13"
2291
2292 #. type: TH
2293 #: mageia-cauldron
2294 #, no-wrap
2295 msgid "Linux man-pages 6.17"
2296 msgstr "Linux man-pages 6.17"
2297
2298 #. type: TH
2299 #: opensuse-leap-16-1 opensuse-tumbleweed
2300 #, no-wrap
2301 msgid "Linux man-pages (unreleased)"
2302 msgstr "Linux man-pages (não lançado)"