From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312
Description of problem:
In the specified bash, on 7.3:
1) ulimit -s 65536
2) ulimit -s 32768
3) ulimit -s 65536
The attempt to re-raise the stacksize fails with the following error:
bash: ulimit: cannot modify stack size limit: Operation not permitted
This does not occur when running bash as root, nor when using tcsh instead of bash.
This can be triggered by lowering the stacksize to *any* value lower than the
initial value set; for example, if step 2 above used 65535, rather than 32768,
the error would still occur.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
See above description.
Actual Results: Unable to raise stacksize ulimit again, until new shell started.
Expected Results: As in tcsh, one should be able to raise and lower the
stacksize ulimit within the range permitted by the soft and hard system limits
(whether architectural, or set by the administrator).
This is exactly as the man page describes. You are setting the hard limit too,
and you forgot to use the -S option.