rustyrussell / ccan

The C Code Archive Network
http://ccodearchive.net/
1.11k stars 206 forks source link

Fix read_all() and write_all() to always set errno on failure #86

Open vasild opened 4 years ago

vasild commented 4 years ago

Make sure errno is always set if false is to be returned. Also retry if write(2) returns 0.

vasild commented 4 years ago

About the failing travis tests: I can reproduce some hangs (maybe the same as in travis, maybe not) even without this patch, using 39b46a0 (latest master). Just compile and run make check or directly:

$ tools/ccanlint/ccanlint -s --deps-fail-ignore ccan/talloc/

or

$ tools/ccanlint/ccanlint -s --deps-fail-ignore ccan/failtest/