bug-coreutils
[Top][All Lists]
Advanced

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

bug#7357: csplit: memory exhausted when using stdout / pipe instead of a


From: Jim Meyering
Subject: bug#7357: csplit: memory exhausted when using stdout / pipe instead of a file
Date: Thu, 11 Nov 2010 11:18:34 +0100

Voelker, Bernhard wrote:
> Jim Meyering wrote:
>>    src/csplit: <2GiB of spaces>xx<2GiB of 0's>: File name too long
>
> I'm not an expert at all in this, but isn't there PATH_MAX on every system?
> So the suffix format could be limited to `csplit -b %<PATH_MAX>d`.
> Just a thought...

On some systems (e.g., Hurd) PATH_MAX is not even defined.
ISTR that on others it is very large, like INT_MAX or UINT_MAX.
Where it is defined, we could do something like that.
Or even better, use a limit (again, if there is one) on the length
of a file name, taking into account where any "/" are in the expansion
of the format string.

Whatever we do, the simpler it is the better, since this is solely
to handle errors about ridiculously long file names.





reply via email to

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