# Brazilian Portuguese translation of manpages # This file is distributed under the same license as the manpages-l10n package. # Copyright © of this file: # Mila , 2001. # André Luiz Fassone , 2001. msgid "" msgstr "" "Project-Id-Version: manpages-l10n\n" "POT-Creation-Date: 2024-06-01 06:20+0200\n" "PO-Revision-Date: 2001-06-02 19:20-0300\n" "Last-Translator: André Luiz Fassone \n" "Language-Team: Brazilian Portuguese \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Virtaal 1.0.0-beta1\n" #. type: TH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "select" msgstr "select" #. type: TH #: archlinux debian-unstable opensuse-tumbleweed #, no-wrap msgid "2024-05-02" msgstr "2 maio 2024" #. type: TH #: archlinux debian-unstable #, fuzzy, no-wrap #| msgid "Linux man-pages 6.7" msgid "Linux man-pages 6.8" msgstr "Linux man-pages 6.7" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "NOME" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO - synchronous I/O " #| "multiplexing" msgid "" "select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO, fd_set - synchronous I/O " "multiplexing" msgstr "" "select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO - multiplexação síncrono " "de E/S" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "BIBLIOTECA" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "Standard C library (I, I<-lc>)" msgstr "Biblioteca C Padrão (I, I<-lc>)" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "SINOPSE" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B<#include Esys/select.hE>\n" msgstr "B<#include Esys/select.hE>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B /* ... */ B\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "BIB<, fd_set *>IB<, fd_set *>IB<,>\n" #| "B< fd_set *>IB<, struct timeval *>IB<);>\n" msgid "" "BIB<, fd_set *_Nullable restrict >IB<,>\n" "B< fd_set *_Nullable restrict >IB<,>\n" "B< fd_set *_Nullable restrict >IB<,>\n" "B< struct timeval *_Nullable restrict >IB<);>\n" msgstr "" "BIB<, fd_set *>IB<, fd_set *>IB<,>\n" "B< fd_set *>IB<, struct timeval *>IB<);>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "BIB<, fd_set *>IB<);>\n" "BIB<, fd_set *>IB<);>\n" "BIB<, fd_set *>IB<);>\n" "BIB<);>\n" msgstr "" "BIB<, fd_set *>IB<);>\n" "BIB<, fd_set *>IB<);>\n" "BIB<, fd_set *>IB<);>\n" "BIB<);>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "" #| "BIB<, fd_set *>IB<, fd_set *>IB<,>\n" #| "B< fd_set *>IB<, const struct timespec *>IB<,>\n" #| "B< const sigset_t *>IB<);>\n" msgid "" "BIB<, fd_set *_Nullable restrict >IB<,>\n" "B< fd_set *_Nullable restrict >IB<,>\n" "B< fd_set *_Nullable restrict >IB<,>\n" "B< const struct timespec *_Nullable restrict >IB<,>\n" "B< const sigset_t *_Nullable restrict >IB<);>\n" msgstr "" "BIB<, fd_set *>IB<, fd_set *>IB<,>\n" "B< fd_set *>IB<, const struct timespec *>IB<,>\n" "B< const sigset_t *>IB<);>\n" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "Feature Test Macro Requirements for glibc (see B(7)):" msgstr "" "Requisitos de macro de teste de recursos para o glibc (consulte " "B(7)):" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "pselect()" msgid "B():" msgstr "pselect()" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid " _POSIX_C_SOURCE E= 200112L\n" msgstr " _POSIX_C_SOURCE E= 200112L\n" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "DESCRIÇÃO" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B: B() allows a program to monitor multiple file descriptors, waiting " "until one or more of the file descriptors become \"ready\" for some class of " "I/O operation (e.g., input possible). A file descriptor is considered ready " "if it is possible to perform a corresponding I/O operation (e.g., " "B(2), or a sufficiently small B(2)) without blocking." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "fd_set" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "A structure type that can represent a set of file descriptors. According to " "POSIX, the maximum number of file descriptors in an I structure is " "the value of the macro B." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "File descriptor sets" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The principal arguments of B() within a loop, the sets I before " "each call." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The contents of a file descriptor set can be manipulated using the following " "macros:" msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This macro clears (removes all file descriptors from) I. It should be " "employed as the first step in initializing a file descriptor set." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This macro adds the file descriptor I to I. Adding a file " "descriptor that is already present in the set is a no-op, and does not " "produce an error." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This macro removes the file descriptor I from I. Removing a file " "descriptor that is not present in the set is a no-op, and does not produce " "an error." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "B()" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "B(), the B() macro can be " "used to test if a file descriptor is still present in a set. B() " "returns nonzero if the file descriptor I is present in I, and zero " "if it is not." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Arguments" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "The arguments of B() has returned, I will be cleared of all file " "descriptors except for those that are ready for reading." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The file descriptors in this set are watched to see if they are ready for " "writing. A file descriptor is ready for writing if a write operation will " "not block. However, even if a file descriptor indicates as writable, a " "large write may still block." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "After B() has returned, I will be cleared of all file " "descriptors except for those for which an exceptional condition has occurred." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This argument should be set to the highest-numbered file descriptor in any " "of the three sets, plus 1. The indicated file descriptors in each set are " "checked, up to this limit (but see BUGS)." msgstr "" #. type: TP #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "I" msgstr "I" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I argument is a I structure (shown below) that " "specifies the interval that B() " "returns immediately. (This is useful for polling.)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If I is specified as NULL, B() and B() is identical, other than " "these three differences:" msgstr "Suas funções são idênticas, com três diferenças:" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The B() uses a timeout that is a I (with seconds and " "microseconds), while B() uses a I (with seconds " "and nanoseconds)." msgstr "" "A função B function may update the I parameter to indicate " #| "how much time was left. The B function does not change this " #| "parameter." msgid "" "B pode atualizar o parâmetro I para indicar quanto " "tempo resta. A função B não muda esse parâmetro." #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "The B() has no I argument, and behaves as B() called " "with NULL I." msgstr "" "A função B() could hang indefinitely if the signal arrived just after the " #| "test but just before the call. On the other hand, B allows one " #| "to first block signals, handle the signals that have come in, then call " #| "B() with the desired I, avoiding the race.) Since " #| "Linux today does not have a I() system call, the current glibc2 " #| "routine still contains this race." msgid "" "The reason that B() is needed is that if one wants to wait for " "either a signal or for a file descriptor to become ready, then an atomic " "test is needed to prevent race conditions. (Suppose the signal handler sets " "a global flag and returns. Then a test of this global flag followed by a " "call of B() poderia travar indefinidamente se o " "sinal chegou logo após o teste mas antes da chamada. De outro lado, " "B permite primeiro bloquear os sinais, manipular os sinais que " "chegam, e então chamar B() com a I, desejada evitando a " "'race'.) Como Linux hoje não apresenta uma chamada de sistema, I() " "a rotina glibc2 atual ainda contém esta 'race'." #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "The timeout" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The I argument for Bs in a loop without reinitializing it. Consider " #| "I to be undefined after B() modifies I to reflect the amount of time not " "slept; most other implementations do not do this. (POSIX.1 permits either " "behavior.) This causes problems both when Linux code which reads I " "is ported to other operating systems, and when code is ported to Linux that " "reuses a I for multiple B() " "returns." msgstr "" "No Linux, I é modificado para refletir a quantidade de tempo não " "inativo; a maior parte das outras implementações não faz isto. Isto causa " "problemas quando um código Linux que interpreta I é portado para " "outro sistema operacional, e quando código portado para Linux reutiliza uma " "struct timeval para múltiplos B." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "VALOR DE RETORNO" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "On success, B was unable to allocate memory for internal tables." msgid "Unable to allocate memory for internal tables." msgstr "B() can fail with the error B " "if the system fails to allocate kernel-internal resources, rather than " "B as Linux does. POSIX specifies this error for B(2), but not " "for B()" msgstr "pselect()" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "POSIX.1-2001, SVr4, 4.3BSD." msgid "POSIX.1-2001, 4.4BSD (first appeared in 4.2BSD)." msgstr "POSIX.1-2001, SVr4, 4.3BSD." #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "4.4BSD (the B surgiu no BSD 4.2). Geralmente portável de/para " "sistemas não-BSD com suporte a clones da camada de 'socket' BSD (incluindo " "variações do System V). No entanto, note que o variante de System V " "tipicamente define a variável de tempo de espera antes de sair, mas o " "variante de BSD não." #. type: TP #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "pselect()" msgid "B()" msgstr "pselect()" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "glibc 2.1. C99, POSIX.1-2001." msgid "Linux 2.6.16. POSIX.1g, POSIX.1-2001." msgstr "glibc 2.1. C99, POSIX.1-2001." #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "Prior to this, it was emulated in glibc (but see BUGS)." msgstr "" #. type: TP #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy, no-wrap #| msgid "I" msgid "B" msgstr "I" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-leap-15-6 opensuse-tumbleweed msgid "POSIX.1-2001." msgstr "POSIX.1-2001." #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "NOTES" msgstr "NOTAS" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The following header also provides the I type: Isys/time." "hE>." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "An I is a fixed size buffer. Executing B() or B() " "with a value of I that is negative or is equal to or larger than " "B will result in undefined behavior. Moreover, POSIX requires " "I to be a valid file descriptor." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The operation of B() in the main program. (To avoid possibly blocking when writing " "to a pipe that may be full or reading from a pipe that may be empty, " "nonblocking I/O is used when reading from and writing to the pipe.)" msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Emulating usleep(3)" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "Some code calls B() " "with all three sets empty, I zero, and a non-NULL I as a " "fairly portable way to sleep with subsecond precision." msgstr "" "Algum código chamou B() and the event notifications provided by " "B(2) and B(7):" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "#define POLLIN_SET (EPOLLRDNORM | EPOLLRDBAND | EPOLLIN |\n" " EPOLLHUP | EPOLLERR)\n" " /* Ready for reading */\n" "#define POLLOUT_SET (EPOLLWRBAND | EPOLLWRNORM | EPOLLOUT |\n" " EPOLLERR)\n" " /* Ready for writing */\n" "#define POLLEX_SET (EPOLLPRI)\n" " /* Exceptional condition */\n" msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Multithreaded applications" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "If a file descriptor being monitored by B() " "unblocks and returns, with an indication that the file descriptor is ready " "(a subsequent I/O operation will likely fail with an error, unless another " "process reopens the file descriptor between the time B(). " "In summary, any application that relies on a particular behavior in this " "scenario must be considered buggy." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "C library/kernel differences" msgstr "Diferenças entre kernel/biblioteca C" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The Linux kernel allows file descriptor sets of arbitrary size, determining " "the length of the sets to be checked from the value of I. However, in " "the glibc implementation, the I type is fixed in size. See also " "BUGS." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The B() interface described in this page is implemented by glibc. " "The underlying Linux system call is named B(). This system call " "has somewhat different behavior from the glibc wrapper function." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The Linux B() system call modifies its I argument. " "However, the glibc wrapper function hides this behavior by using a local " "variable for the timeout argument that is passed to the system call. Thus, " "the glibc B() function does not modify its I argument; " "this is the behavior required by POSIX.1-2001." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The final argument of the B() system call is not a I pointer, but is instead a structure of the form:" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "" "struct {\n" " const kernel_sigset_t *ss; /* Pointer to signal set */\n" " size_t ss_len; /* Size (in bytes) of object\n" " pointed to by \\[aq]ss\\[aq] */\n" "};\n" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "This allows the system call to obtain both a pointer to the signal set and " "its size, while allowing for the fact that most architectures support a " "maximum of 6 arguments to a system call. See B(2) for a " "discussion of the difference between the kernel and libc notion of the " "signal set." msgstr "" #. type: SS #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "Historical glibc details" msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "glibc 2.0 provided an incorrect version of B() that did not take a " "I argument." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "From glibc 2.1 to glibc 2.2.1, one must define B<_GNU_SOURCE> in order to " "obtain the declaration of B() from Isys/select.hE>." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "BUGS" msgstr "BUGS" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "POSIX allows an implementation to define an upper limit, advertised via the " "constant B, on the range of file descriptors that can be " "specified in a file descriptor set. The Linux kernel imposes no fixed " "limit, but the glibc implementation makes I a fixed-size type, with " "B defined as 1024, and the B() macros operating according " "to that limit. To monitor file descriptors greater than 1023, use " "B(2) or B(7) instead." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "The implementation of the I arguments as value-result arguments is a " "design error that is avoided in B(2) and B(7)." msgstr "" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "According to POSIX, B(). This " "implementation remained vulnerable to the very race condition that " "B() was designed to prevent. Modern versions of glibc use the " "(race-free) B() system call on kernels where it is provided." msgstr "" #. Stevens discusses a case where accept can block after select #. returns successfully because of an intervening RST from the client. #. Maybe the kernel should have returned EIO in such a situation? #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed msgid "" "On Linux, B() also modifies I if the call is interrupted " "by a signal handler (i.e., the B error return). This is not " "permitted by POSIX.1. The Linux B() system call has the same " "behavior, but the glibc wrapper hides this behavior by internally copying " "the I to a local variable and passing that variable to the system " "call." msgstr "" #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "EXEMPLOS" #. type: Plain text #: archlinux debian-unstable fedora-40 fedora-rawhide mageia-cauldron #: opensuse-tumbleweed #, no-wrap msgid "" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Esys/select.hE\n" "\\&\n" "int\n" "main(void)\n" "{\n" " int retval;\n" " fd_set rfds;\n" " struct timeval tv;\n" "\\&\n" " /* Watch stdin (fd 0) to see when it has input. */\n" "\\&\n" " FD_ZERO(&rfds);\n" " FD_SET(0, &rfds);\n" "\\&\n" " /* Wait up to five seconds. */\n" "\\&\n" " tv.tv_sec = 5;\n" " tv.tv_usec = 0;\n" "\\&\n" " retval = select(1, &rfds, NULL, NULL, &tv);\n" " /* Don\\[aq]t rely on the value of tv now! */\n" "\\&\n" " if (retval == -1)\n" " perror(\"select()\");\n" " else if (retval)\n" " printf(\"Data is available now.\\en\");\n" " /* FD_ISSET(0, &rfds) will be true. */\n" " else\n" " printf(\"No data within five seconds.\\en\");\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" msgstr "" #. SRC END #. type: SH #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "VEJA TAMBÉM" #. type: Plain text #: archlinux debian-bookworm debian-unstable fedora-40 fedora-rawhide #: mageia-cauldron opensuse-leap-15-6 opensuse-tumbleweed #, fuzzy #| msgid "" #| "B(2), B(2), B(2), B(2), B(2), " #| "B(2), B(2), B(2), B(2), " #| "B(7), B