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

Re: ulimit should limit the shell?



:} In other shells (bash, ksh93 and pdksh) ulimit affects the shell itself,
:} not only child processes.  I think zsh ulimit should behave similarily.
:} Even after ulimit is changed limit can still be used to set limits which
:} affect child processes only.
:According to zshbuiltins.1, `ulimit' affects child processes only, but
:`limit' affects both zsh and its children.  Is this description wrong?

It's not really a clear description in the manual.

Running limit/ulimit/unlimit sets limits on all child processes.
Running "limit -s" sets the limits for the shell (using the same limits
the child processes are currently set to).
So to have different limits for child and shell you need to setup the
shell's limits first, limit -s, then set the child's limits.

:I believe the reason for the zsh behavior is that the zsh `limit' is
:derived from csh/tcsh, where `ulimit' does not exist.  Why `ulimit' is
:not simply a synonym for `limit' I do not know; `ulimit' got put in to
:zsh during one of the stretches when I wasn't paying much attention to
:the mailing list.

I don't know where ulimit came from, though bash has it.  However it's
not fully compatible with the bash ulimit.  If it's been put in to
provide some sort of compatibility with bash (or anything else) it
probably should be changed to be more compatible.


-- 
Mason [G.C.W]  mason@xxxxxxxxxxxxxxxxxx    "Hurt...Agony...Pain...LOVE-IT"




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