[email protected] said:
> Yes.  A Unix write(2) under 512 bytes is atomic, and (when to a local
> filesystem) can't be signal-interrupted either.  There's a constant PIPE_BUF
> which is historically 512 but may be larger on modern Unixes - I haven't
> looked in a long time.  Technically it pertains to pipe reads, but writes
> that length or below are also atomic on disk filesystems.

Thanks.

Where is that documented?  I'd expect some alignment constraints.

I'm interested in the case where the chunk written crosses a disk page and 
the system crashes after writing the first page but before writing the next 
one.

There may be similar problems on the memory buffer.  The second page gets 
swapped out...

PIPE_BUF is 4096 on this system.

We are only writing a few bytes.



-- 
These are my opinions.  I hate spam.



_______________________________________________
devel mailing list
[email protected]
http://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to