zsh-workers
 help / color / mirror / code / Atom feed
* ulimit should limit the shell?
@ 1996-06-29 15:53 Zoltan Hidvegi
  1996-06-30  7:30 ` Barton E. Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Zoltan Hidvegi @ 1996-06-29 15:53 UTC (permalink / raw)
  To: Zsh hacking and development

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.

I enable coredumps by defaults in my .zshrc to catch rare zsh bugs but this
does not affect login shells so I have no coredumps when zsh crashes
(fortunately this does not seem to occur recently).

Zoltan



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ulimit should limit the shell?
  1996-06-29 15:53 ulimit should limit the shell? Zoltan Hidvegi
@ 1996-06-30  7:30 ` Barton E. Schaefer
  1996-06-30  9:26   ` Geoff Wing
  0 siblings, 1 reply; 3+ messages in thread
From: Barton E. Schaefer @ 1996-06-30  7:30 UTC (permalink / raw)
  To: Zoltan Hidvegi, Zsh hacking and development

On Jun 29,  5:53pm, Zoltan Hidvegi wrote:
} Subject: 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?

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 enable coredumps by defaults in my .zshrc to catch rare zsh bugs but
} this does not affect login shells so I have no coredumps when zsh crashes
} (fortunately this does not seem to occur recently).

If all you're worried about is having the ability to affect the shell
itself, use `limit' instead of `ulimit'.  If you're worried about the
ksh compatibility issue, I don't know of any shell other than zsh that
allows you to set limits for children differently from the limits of
the parent shell; so for all I care, the difference between `ulimit'
and `limit' can go away, or be made available only throug a switch
given to `ulimit'.

-- 
Bart Schaefer
schaefer@z-code.com
http://www.well.com/www/barts



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ulimit should limit the shell?
  1996-06-30  7:30 ` Barton E. Schaefer
@ 1996-06-30  9:26   ` Geoff Wing
  0 siblings, 0 replies; 3+ messages in thread
From: Geoff Wing @ 1996-06-30  9:26 UTC (permalink / raw)
  To: zsh-list

:} 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@werple.mira.net.au    "Hurt...Agony...Pain...LOVE-IT"



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-06-30  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-29 15:53 ulimit should limit the shell? Zoltan Hidvegi
1996-06-30  7:30 ` Barton E. Schaefer
1996-06-30  9:26   ` Geoff Wing

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).