Problem s FIFO (mirne OT)
Stanislav Meduna
stano na trillian.eunet.sk
Čtvrtek Červen 10 21:04:57 CEST 1999
On 9 Jun 1999 14:39:37 +0200, Petr Novotny wrote:
: Moment, neni nekde (POSIX?) zaruceno, za zapisy write() do roury
: po nejakou velikost jsou atomicke? Dokonce jsem si i myslel, ze
: by to mohlo byt 512 bytu. Netusim, kde jsem to cetl :-(
The single Unix specification, Version 2 skutocne pise:
Write requests to a pipe or FIFO will be handled the same
as a regular file with the following exceptions:
...
Write requests of {PIPE_BUF} bytes or less will not be
interleaved with data from other processes doing writes
on the same pipe. Writes of greater than {PIPE_BUF}
bytes may have data interleaved, on arbitrary boundaries,
with writes by other processes, whether or not the
O_NONBLOCK flag of the file status flags is set.
PIPE_BUF na Linuxe je 4096, POSIX garantuje
aspon 512 byte.
Zdravi
--
Stano
Další informace o konferenci Linux