Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug in ulimit ?



Stephane Chazelas wrote:
> On Tue, Apr 17, 2007 at 03:04:55AM -0700, Micah Cowan wrote:
> [...]
>> % ulimit -t 0
>> % ( ulimit -t; while :; do :; done )
>> 0
>> << watch the CPU time used climb in top >>
>> ^C
> [...]
>> It therefore appears  that while the manpage is correct for hard limits,
>> soft limits of 0 are still treated as unlimited.
> [...]
> 
> ulimit -t
> 
> doesn't set the limit to 0 but to infinity (in effect, to the
> hard limit).
> 
> It's ulimit -t 0
> to set the limit to 0 (well actually, 1 second in that case).
> 
Originally responded to this directly, but then realized that the
veracity of this statement is pertinent to the next message I sent as
well, so it's worth addressing on-list, in case it isn't clear to others.

ulimit -t

doesn't set the limit _at_all_; it prints it (hence the "0", above).

-- 
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/



Messages sorted by: Reverse Date, Date, Thread, Author