On 2013/11/14 07:56:48, jarin wrote:
Thanks for the great comments. In patch set 3, I fixed everything except the
fwrite bit. According to the fwrite man page, fwrite only writes shorter
chunks
if there is an error (not to be confused with the low-level 'write', which can be indeed interrupted by a signal). Also, according to the man page, fwrite's
return type is size_t (unlike 'write', which is indeed ssize_t).

Oh, you're right about size_t.  Sorry about that.

As to fwrite() writing fewer bytes than requested, I can only speak for glibc here but when the write() system call fails (including because of EINTR), glibc sets the error flag and moves on. It won't try to write again until the next call to fwrite() or fclose(). That second function is especially problematic because if the flush in fclose() fails, the data is gone forever and you end up
with a truncated file.

https://codereview.chromium.org/70013002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to