Bernhard Voelker <[email protected]> writes:

> FWIW:
> I'm not sure if we have other utilities which digest '\0'-delimited input,
> and where we know that a useful iteration item can never be longer than N.
> If we find a nice solution, we might be able to make it more generic and
> read up to such given N.

Not '\0' delimited, but I think a similar case to what you mention is
'cksum -c':

    $ (ulimit -v $(($(numfmt --from=iec 5G) / 1024)); cksum -c /dev/zero)
    cksum: /dev/zero: read error

In this case mmap fails with ENOMEM, but for some reason that
information is removed from the error. I'll have a look at that later.

It could likely be handled similarly --files0-from, i.e., read the
maximum file name length, max checksum length, and some extra
characters based on the format we are using.

Collin

Reply via email to