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

Re: Fwd: Bug#765410: ulimit broken as root if it fails once [origin: goswin-v-b@xxxxxx]

On Oct 16, 12:33am, Axel Beckert wrote:
} the following has been reported in Debian at
} http://bugs.debian.org/765410 and I can reprodcue it with 4.3.10,
} 4.3.17, 5.0.6 and 5.0.7.
} The issue seems to only appear if ulimit is run as root user. I was
} not able to reproduce it as non-root user. (I was also unable to
} reproduce it on any of Debian's kfreebsd-* architectures, so it may be
} a linux-only issue, too.)

This is primarily a documentation issue.

As root, "ulimit" by default attempts to raise both the hard and soft
limits, but only lowers the soft ones.  Each time you try to lower the
soft limit, it attempts to re-assert the previously specified hard limit,
and generates the error -- but the soft limit is in fact been correctly
changed, as you can see by examining the output of the "limit" command
(without the leading "u").

To lower the hard limit again and make the error message go away, one
simply has to use "ulimit -H ...".

This could also be fixed by having bin_ulimit read back the actual limit
after a failure to set the hard limit and store that instead of keeping
the "desired" hard limit around and trying to change it again.

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