Hello,
(continuing old topic of csplit/errno reporting...)
> On 23/10/15 00:40, PƔdraig Brady wrote:
>> On 22/10/15 21:01, Jim Meyering wrote:
>>
>>>> I'll be able to troubleshoot and provide more information in couple of
>>>> days.
>>>> A more elaborate solution is to save the errno after 'fwrite()' in a
>>>> variable,
>>>> and print that variable. I can send such a patch if that's a better idea.
>>>
>>> Yes, this sounds better.
>>
>> Yes the tradeoff discussed above is a bad one in csplit's case
>> as it only has a single fwrite() call.
...
> Actually it's a bit awkward to test. You might have to resort
> to tests using require_gcc_shared_ and wrap write() to return ENOSPC.
Attached is such change with relevant test using LD_PRELOAD.
Tested on Debian with GCC 4.7.2, and on Mac OS X (where the test is skipped).
I'll soon test on more systems.
comments welcomed,
- assaf