"Denis A. Doroshenko" <d.doroshenko@omnitel.net> writes:
> i've tried to get partial write on disk shortage condition and had no
> success. on OpenBSD, if there is no space write() seems to write the
> whole buffer or fail with -1/errno. i used such proggie attached to
> the and (owell, i'm not sure about forks, but it adds more
> simultaneosity... huh?). BTW. i didn't see anywhere i looked whetjer
> write on disk files can fail after writting some part of data.
Try writing more bytes in a single call to write(). Like, 100000
bytes or something.
You will only get a short return from write() if you write more than
the disk block size. On modern file systems the disk block size can
get fairly large.
Ian