From owner-freebsd-questions Fri Apr 16 14:33: 8 1999 Delivered-To: freebsd-questions@freebsd.org Received: from www.value.net (www-fr.value.net [207.33.92.8]) by hub.freebsd.org (Postfix) with ESMTP id 162C31540E for ; Fri, 16 Apr 1999 14:33:03 -0700 (PDT) (envelope-from rfg@monkeys.com) Received: from monkeys.com (i180.value.net [206.14.136.180]) by www.value.net (8.8.7/8.7.3) with ESMTP id OAA15361; Fri, 16 Apr 1999 14:32:25 -0700 (PDT) Received: from monkeys.com ([127.0.0.1]) by monkeys.com (8.9.3/8.9.3) with ESMTP id OAA24726; Fri, 16 Apr 1999 14:43:27 -0700 To: Guy Helmer Cc: questions@freebsd.org Subject: Re: /bin/sh limits -u doesn't seem to set the limit In-reply-to: Your message of Fri, 16 Apr 1999 15:15:57 -0500. From: "Ronald F. Guilmette" Date: Fri, 16 Apr 1999 14:43:27 -0700 Message-ID: <24724.924299007@monkeys.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , yo u wrote: >On Fri, 16 Apr 1999, Ronald F. Guilmette wrote: > >> Can somebody please explain to me what goes on here? >> >> ---------------------------------------------------------------- >> $ limits -u >> Resource limits (current): >> maxprocesses-max 512 >> maxprocesses-cur 64 >> $ limits -u 400 >> Resource limits (current): >> maxprocesses 400 >> $ limits -u >> Resource limits (current): >> maxprocesses-max 512 >> maxprocesses-cur 64 >> $ >> ---------------------------------------------------------------- >> >> What's the point of having a shell command to increase the maxproc limit >> if it then just immediately reverts back to exactly the same value it had >> before? > >In the limits(1) man page: > > Within a shell script, limits will normally be used with eval > within backticks as follows: > > eval `limits -e -C daemon` > > which causes the output of limits to be evaluated and set by the > current shell. > >Ignore the part about "Within a shell script" -- it applies to an >interactive shell as well. Thanks and apologies. I just screwed up. I though that `limits' was the shell built-in for setting limits, but it isn't. `limits' is an external program, and that explains the result I got. I really wanted to be using the shell built-in which, for sh, is called `ulimit'. Sorry. Serves me right for using only csh all my life! (It's built-in is called just `limit'.) -- Ron Guilmette, Roseville, California ---------- E-Scrub Technologies, Inc. -- Deadbolt(tm) Personal E-Mail Filter demo: http://www.e-scrub.com/deadbolt/ -- FREE Web Harvester Protection - http://www.e-scrub.com/wpoison/ - Try it! -- FREE DynamicIP Spam Filtering - http://www.imrss.org/dssl/ - TELL YOUR ISP! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message