Daniel Shahaf schrieb/wrote: > Thilo Six wrote on Wed, Dec 30, 2015 at 17:12:17 +0100: >> The manpage says (as mentioned earlier): >> unlimit [ -hs ] resource ... >> The resource limit for each resource is set to the hard >> limit. >> >> Again "hard limit" by its own is as ambiguous as "unlimited". >> > > The intended meaning of "hard limit" in this context is "the value of > the 'rlim_max' member of 'struct rlimit'". The getrlimit(2) man page > (and its POSIX spec) use that term with the same meaning.
Up front i have to say i don't speak C. That being said i digged up the pointers you gave and i admit the unlimit behaves acordingly to the specs. (Side note: Actually that is nothing i ever argued against.) ,----[ getrlimit(2) ]-------- A privileged process (under Linux: one with the CAP_SYS_RESOURCE capability) may make arbitrary changes to either limit value. `----------------------------------------------------------------------- So unlimited in this context indeed means ∞ and it may be changed arbitrary. hmmm >> So as i said above, the definition of "hard limit" should be explicit in the >> man >> page, e.g.: >> The resource limit for each resource is set to the hard limit, that is ... > > Maybe. I honestly don't have an opinion — I don't find the man page > ambiguous in the first place ☺. May i ask then what is a real world use case for the unlimit builtin then? (Just to make it clear, i am not ironic here, just interested trying to understand it.) Thank you for your answer. kind regards, Thilo