On Wednesday 26 November 2008 08:54:29 Andreas Klein wrote:
> Hello.
>
> I have found the following strange bahavoiur of ulimit.
>
> As normal user I can increase the stack size once but not twice:
>
> [EMAIL PROTECTED]:~$ ulimit -s
> 8192
> [EMAIL PROTECTED]:~$ ulimit -s 20000
You are setting the hard limit here.

> [EMAIL PROTECTED]:~$ ulimit -s 30000
> bash: ulimit: stack size: cannot modify limit: Operation not permitted
You are trying to set soft limit higher than hard limit, which is not 
permitted.

> For comparision after a new login I can do:
>
> [EMAIL PROTECTED]:~$ ulimit -s
> 8192
> [EMAIL PROTECTED]:~$ ulimit -s 20000
>
> I can not imagige that this is ok. I guess a normal user should not be
> allowed to increase the stack size.
The normal user is able to increase stack size, that's ok... but you can't set 
soft limit higher than hard limit. Please consider ulimit options -H and -S.


Kamil


Reply via email to