zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-users@sunsite.dk (Zsh users list)
Subject: Re: umlimit and /etc/zshenv
Date: Fri, 10 May 2002 10:40:06 +0100	[thread overview]
Message-ID: <18763.1021023606@csr.com> (raw)
In-Reply-To: "Thorsten Haude"'s message of "Fri, 10 May 2002 06:33:55 +0200." <20020510043355.GJ10130@eumel.yoo.net>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3436 bytes --]

Thorsten Haude wrote:
> Hi,
> 
> I have the following line in my /etc/zshenv:
>     ulimit -c 20000
> 
> 1. This is a legacy from the Bash. I read zsh's manpage but couldn't
> find a clear statement about what happens if neither -S nor -H are
> given.

If -H isn't set, soft limits are assumed.  The manual page is a little
elliptical, but reading what it doesn't quite say implies this --- -S is
there to allow you to set both types of limit at once.  The patch at the
bottom makes this clearer.

> 2. I get problems with this command when a process reduces the hard
> limit and calls a subprocess. So I wonder whether I get the semantics
> of /etc/zshenv and ulimit wrong and ulimit should in fact be in
> another /etc/z* file.
> Could someone explain where my error is?

I think you're saying you're reducing the hard limit, and then executing
a command (the one in /etc/zshenv) which tries to make the soft limit
higher than the hard limit.  I think that's the correct behaviour ---
there's no way it can increase the value past the hard limit, and zsh
happens to warn you it can't do that when other shells may not (you may
find bash returns status 1 even if it doesn't print anything).

If this is what is going on, you need to work around it somehow:  either
use the output from ulimit or limit to decide what the hard limit is, or
if you're not interested in the error message simply send it to
/dev/null with `2>/dev/null'.

> Im übrigen gilt ja hier derjenige, der auf den Schmutz hinweist,
> für viel gefährlicher als der, der den Schmutz macht.
> 	- Kurt Tucholsky

(In case anyone was wondering: in general the people who root out dirt
should be considered much more dangerous than those who make the dirt in
the first place.)

Index: Doc/Zsh/builtins.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/builtins.yo,v
retrieving revision 1.44
diff -u -r1.44 builtins.yo
--- Doc/Zsh/builtins.yo	20 Feb 2002 12:51:53 -0000	1.44
+++ Doc/Zsh/builtins.yo	10 May 2002 09:32:07 -0000
@@ -1281,7 +1281,8 @@
 item(tt(ulimit) [ tt(-SHacdflmnpstv) [ var(limit) ] ... ])(
 Set or display resource limits of the shell and the processes started by
 the shell.  The value of var(limit) can be a number in the unit specified
-below or the value `tt(unlimited)'.  If the tt(-H) flag is given use
+below or the value `tt(unlimited)'.  By default, only soft limits are
+manipulated. If the tt(-H) flag is given use
 hard limits instead of soft limits.  If the tt(-S) flag is given
 together with the tt(-H) flag set both hard and soft limits.  If no
 options are used, the file size limit (tt(-f)) is assumed.  If

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


  reply	other threads:[~2002-05-10  9:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-10  4:33 Thorsten Haude
2002-05-10  9:40 ` Peter Stephenson [this message]
2002-05-10 11:26   ` Thorsten Haude
2002-05-10 12:35     ` Oliver Kiddle
2002-05-10 21:20       ` Thorsten Haude
2002-05-10 21:38         ` Bart Schaefer
2002-05-10 12:42     ` OT: Quote (was: umlimit and /etc/zshenv) Thorsten Haude

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18763.1021023606@csr.com \
    --to=pws@csr.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).