*BSD News Article 20703


Return to BSD News archive

Xref: sserve comp.unix.shell:11006 comp.unix.admin:13350 comp.unix.aix:26852 comp.unix.bsd:12592 comp.unix.misc:9064 comp.unix.programmer:11593 comp.unix.wizards:30707
Newsgroups: comp.unix.shell,comp.unix.admin,comp.unix.aix,comp.unix.bsd,comp.unix.misc,comp.unix.programmer,comp.unix.wizards
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!uunet!ftpbox!mothost!white!sapphire.rtsg.mot.com!galena15!murphyn
From: murphyn@rtsg.mot.com (Neal P. Murphy)
Subject: Re: limit without csh ?
Message-ID: <murphyn.747588289@galena15>
Sender: news@rtsg.mot.com
Nntp-Posting-Host: galena15
Organization: Motorola Inc., Cellular Infrastructure Group
References: <1993Sep8.203920.10026@mnemosyne.cs.du.edu> <1993Sep08.225420.21144@rz.uni-jena.de>
Date: Thu, 9 Sep 1993 15:24:49 GMT
Lines: 26

prm@rz.uni-jena.de (Ralf Muschall) writes:

>The subject says it: Is it possible to get the 
>effect of the limit command (in csh) in bourne-family
>shells (or independently of shells at all)?
>I didn't find anything in the manpage what system calls
>are performed by csh when limit is called.
>(I just want to say something like
>limit coredumpsize 0
>etc. Calling a temporary csh, saying
>that and exiting doesn't help - it is not persistent.)

/bin/sh doesn't appear to have any such command. bash and ksh
both have ulimit:
    usage: ulimit [-cmdstf] [new limit]

ulimit is more SysV'ish. ulimit -a displays what appears to
be all the limits, but the values are wrong. RTBM for more
information about ulimit.

Did you try exec'ing csh, setting the limit, and exec'ing your
own shell? The limits appear to be process-based and inheritable.

See also getrlimit(2), ulimit(3).

Fester