coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] readlink,realpath: promptly diagnose write errors


From: Collin Funk
Subject: Re: [PATCH] readlink,realpath: promptly diagnose write errors
Date: Fri, 09 Jan 2026 17:28:19 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

Collin Funk <collin.funk1@gmail.com> writes:

>> Though that got me thinking that commands with --files0-from
>> can have indefinite output, so I adjusted du and wc to output early
>> and added tests in the attached.
>
> Nice catch. I pushed my patch. I'll let you decide if you want to merge
> the NEWS entries into one, or leave them seperate to describe the
> rationale for each case.

Oh, I realized that 'cksum' cant write for a long time too:

    $ dd if=/dev/random of=input bs=1024 \
        count=$(($(numfmt --from=iec 512M) / 1024)) status=none
    $ env time --format=%E cksum -a sha3 --length 256 \
        $(yes input | head -n 10) > /dev/full
    cksum: write error
    Command exited with non-zero status 1
    0:11.53
    $ env time --format=%E cksum --check check > /dev/full
    cksum: write error
    Command exited with non-zero status 1
    0:11.64

This patch should fix it like so:

    $ env time --format=%E ./src/cksum -a sha3 --length 256 \
        $(yes input | head -n 10) > /dev/full
    cksum: write error: No space left on device
    Command exited with non-zero status 1
    0:01.15
    $ env time --format=%E ./src/cksum --check check > /dev/full
    cksum: write error: No space left on device
    Command exited with non-zero status 1
    0:01.14

I'll add some tests later before pushing.

Collin

Attachment: cksum-write-error.diff
Description: Text Data


reply via email to

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