Dean Gaudet wrote:
>
> You can open a single socketpair() before forking that all children use to
> send to the parent. If the buffer isn't full (heh) then a write() of a
> "small size" is atomic.
>
> Anyone know if POSIX promises that behaviour? We actually already rely on
> it -- all our log code assumes that write() for a "small size" is atomic
> (and that the OS implements O_APPEND atomically as well, and that the
> underlying fs allows the atomicity to work... i.e. not NFS).
>
Unfortunately, I don't think POSIX promises the atomic behavior on
sockets :/ I'll double check just to make sure though.
--
====================================================================
Jim Jagielski | jaguNET Access Services
jim@jaguNET.com | http://www.jaguNET.com/
"Not the Craw... the CRAW!"
|