coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: csplit 'write error' missing errno?


From: Pádraig Brady
Subject: Re: csplit 'write error' missing errno?
Date: Tue, 10 Nov 2015 18:50:54 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 10/11/15 16:37, Assaf Gordon wrote:
> 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.

It would be good to verify we get some detail in the diagnostic,
as that's what the patch is doing.
I.E. something like:

sed 's/:...*/.../ err
compare exp err || fail=1

Otherwise looks perfect.

thanks!
Pádraig.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]