On Sat, Jul 10, 2010 at 11:28 PM, Patrick Donnelly <batr...@batbytes.com> wrote: > On Sat, Jul 10, 2010 at 2:38 PM, C. P. Ghost <cpgh...@cordula.ws> wrote: >> >> Or, to be more precise, is it possible that write(2) returns 0 for >> some reason, perhaps because the device isn't ready and can't >> accept more data, so it says that it wrote 0 bytes, but that you >> are free to try again? > > write returning 0 appears to be the problem. That is indeed strange > and I would guess it may be a bug?
I don't know if it is a bug at all, and if the standard isn't precise enough and allows this. Granted, write(2) returning 0 for file descriptors that weren't opened with O_NONBLOCK looks pretty weird, and somehow it doesn't "feel" right. Perhaps it happens because you're not writing to a file system (that would catch this?) but to the raw device itself, and the raw device behaves like a tape, a pipe, or a socket in this case? Strange indeed. > - Patrick Donnelly -cpghost. -- Cordula's Web. http://www.cordula.ws/ _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"