ulimit (2, -1)
Ulrich Drepper
drepper@redhat.com
Mon Sep 24 20:07:00 GMT 2001
Andreas Jaeger <aj@suse.de> writes:
> Can somebody please double check this with the standards?
>
> If the patch is ok, I'll fix also the other ulimit implementations in
> glibc. Ok to commit?
I've checked in a patch now. Although I'm not entirely agreeing with
Mark's analysis (this specific problem is actually unspecified in the
standard since it's not overflowing in rlim_t) we have to handle
negative values appropriately. The problem is that some 32bit
architectures support 4GB files and we simply have to ignore that the
ulimit() result is signed. So, the compuations are carried out as if
unsigned and on overflow RLIM_INFINITY is used.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
More information about the Libc-hacker
mailing list