bug-coreutils
[Top][All Lists]
Advanced

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

Re: limits determination in shell


From: Jim Meyering
Subject: Re: limits determination in shell
Date: Thu, 13 Nov 2008 22:17:37 +0100

Pádraig Brady <address@hidden> wrote:
> I was wondering adding/generalizing some of the test shell
> scripts in coreutils. Often one wants to check various
> boundary cases so it would be nice to be able to obtain
> various limits as coreutils sees them.
>
> I could use getconf, but that's not guaranteed to
> match coreutils and doesn't if you look at `getconf SSIZE_MAX`,
> and I'm not sure of it's availability anyway.
>
> So I was wondering if there was something already
> existing to get these limits from coreutils?
> If not then perhaps adding a util so one could:
> eval $(getlimits) to have them available in shell?
> I'm not suggesting util for users, just for
> use by the coreutils test scripts.

This would be useful indeed.
Many times I've had to compromise by testing against
a limit of e.g., 2^64, rather than against ULONG_MAX.

You probably noticed that there is precedence with
the built-but-never-installed src/setuidgid.c.
It's used only for testing.




reply via email to

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