#, fuzzy msgid "" msgstr "" "Project-Id-Version: man-pages-l10n VERSION\n" "POT-Creation-Date: 2014-07-17 17:57+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: man-pages/man7/pipe.7:25 #, no-wrap msgid "PIPE" msgstr "" #. type: TH #: man-pages/man7/pipe.7:25 #, no-wrap msgid "2014-07-08" msgstr "" #. type: TH #: man-pages/man7/pipe.7:25 #, no-wrap msgid "Linux" msgstr "" #. type: TH #: man-pages/man7/pipe.7:25 #, no-wrap msgid "Linux Programmer's Manual" msgstr "" #. type: SH #: man-pages/man7/pipe.7:26 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:28 msgid "pipe - overview of pipes and FIFOs" msgstr "" #. type: SH #: man-pages/man7/pipe.7:28 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:37 msgid "" "Pipes and FIFOs (also known as named pipes) provide a unidirectional " "interprocess communication channel. A pipe has a I and a I. Data written to the write end of a pipe can be read from the read end " "of the pipe." msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:47 msgid "" "A pipe is created using B(2), which creates a new pipe and returns two " "file descriptors, one referring to the read end of the pipe, the other " "referring to the write end. Pipes can be used to create a communication " "channel between related processes; see B(2) for an example." msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:66 msgid "" "A FIFO (short for First In First Out) has a name within the filesystem " "(created using B(3)), and is opened using B(2). Any process " "may open a FIFO, assuming the file permissions allow it. The read end is " "opened using the B flag; the write end is opened using the " "B flag. See B(7) for further details. I: although " "FIFOs have a pathname in the filesystem, I/O on FIFOs does not involve " "operations on the underlying device (if there is one)." msgstr "" #. type: SS #: man-pages/man7/pipe.7:66 #, no-wrap msgid "I/O on pipes and FIFOs" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:71 msgid "" "The only difference between pipes and FIFOs is the manner in which they are " "created and opened. Once these tasks have been accomplished, I/O on pipes " "and FIFOs has exactly the same semantics." msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:85 msgid "" "If a process attempts to read from an empty pipe, then B(2) will " "block until data is available. If a process attempts to write to a full " "pipe (see below), then B(2) blocks until sufficient data has been " "read from the pipe to allow the write to complete. Nonblocking I/O is " "possible by using the B(2) B operation to enable the " "B open file status flag." msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:89 msgid "" "The communication channel provided by a pipe is a I: there is " "no concept of message boundaries." msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:116 msgid "" "If all file descriptors referring to the write end of a pipe have been " "closed, then an attempt to B(2) from the pipe will see end-of-file " "(B(2) will return 0). If all file descriptors referring to the read " "end of a pipe have been closed, then a B(2) will cause a B " "signal to be generated for the calling process. If the calling process is " "ignoring this signal, then B(2) fails with the error B. An " "application that uses B(2) and B(2) should use suitable " "B(2) calls to close unnecessary duplicate file descriptors; this " "ensures that end-of-file and B/B are delivered when " "appropriate." msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:120 msgid "It is not possible to apply B(2) to a pipe." msgstr "" #. type: SS #: man-pages/man7/pipe.7:120 #, no-wrap msgid "Pipe capacity" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:132 msgid "" "A pipe has a limited capacity. If the pipe is full, then a B(2) " "will block or fail, depending on whether the B flag is set (see " "below). Different implementations have different limits for the pipe " "capacity. Applications should not rely on a particular capacity: an " "application should be designed so that a reading process consumes data as " "soon as it is available, so that a writing process does not remain blocked." msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:146 msgid "" "In Linux versions before 2.6.11, the capacity of a pipe was the same as the " "system page size (e.g., 4096 bytes on i386). Since Linux 2.6.11, the pipe " "capacity is 65536 bytes. Since Linux 2.6.35, the default pipe capacity is " "65536 bytes, but the capacity can be queried and set using the B(2) " "B and B operations. See B(2) for more " "information." msgstr "" #. type: SS #: man-pages/man7/pipe.7:147 #, no-wrap msgid "PIPE_BUF" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:169 msgid "" "POSIX.1-2001 says that B(2)s of less than B bytes must be " "atomic: the output data is written to the pipe as a contiguous sequence. " "Writes of more than B bytes may be nonatomic: the kernel may " "interleave the data with data written by other processes. POSIX.1-2001 " "requires B to be at least 512 bytes. (On Linux, B is " "4096 bytes.) The precise semantics depend on whether the file descriptor is " "nonblocking (B), whether there are multiple writers to the pipe, " "and on I, the number of bytes to be written:" msgstr "" #. type: TP #: man-pages/man7/pipe.7:169 #, no-wrap msgid "B disabled, I E= B" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:178 msgid "" "All I bytes are written atomically; B(2) may block if there is " "not room for I bytes to be written immediately" msgstr "" #. type: TP #: man-pages/man7/pipe.7:178 #, no-wrap msgid "B enabled, I E= B" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:192 msgid "" "If there is room to write I bytes to the pipe, then B(2) succeeds " "immediately, writing all I bytes; otherwise B(2) fails, with " "I set to B." msgstr "" #. type: TP #: man-pages/man7/pipe.7:192 #, no-wrap msgid "B disabled, I E B" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:204 msgid "" "The write is nonatomic: the data given to B(2) may be interleaved " "with B(2)s by other process; the B(2) blocks until I bytes " "have been written." msgstr "" #. type: TP #: man-pages/man7/pipe.7:204 #, no-wrap msgid "B enabled, I E B" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:219 msgid "" "If the pipe is full, then B(2) fails, with I set to B." " Otherwise, from 1 to I bytes may be written (i.e., a \"partial write\" " "may occur; the caller should check the return value from B(2) to see " "how many bytes were actually written), and these bytes may be interleaved " "with writes by other processes." msgstr "" #. type: SS #: man-pages/man7/pipe.7:219 #, no-wrap msgid "Open file status flags" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:225 msgid "" "The only open file status flags that can be meaningfully applied to a pipe " "or FIFO are B and B." msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:237 msgid "" "Setting the B flag for the read end of a pipe causes a signal " "(B by default) to be generated when new input becomes available on " "the pipe (see B(2) for details). On Linux, B is supported " "for pipes and FIFOs only since kernel 2.6." msgstr "" #. type: SS #: man-pages/man7/pipe.7:237 #, no-wrap msgid "Portability notes" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:243 msgid "" "On some systems (but not Linux), pipes are bidirectional: data can be " "transmitted in both directions between the pipe ends. According to POSIX.1-" "2001, pipes only need to be unidirectional. Portable applications should " "avoid reliance on bidirectional pipe semantics." msgstr "" #. type: SH #: man-pages/man7/pipe.7:243 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: man-pages/man7/pipe.7:255 msgid "" "B(2), B(2), B(2), B(2), B(2), B