Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!cbosgd!osu-cis!tut!tut.cis.ohio-state.edu!mumble@karl From: karl@mumble.cis.ohio-state.edu (Karl Kleinpaste) Newsgroups: comp.sys.att Subject: Re: 3b2/400 ulimit Message-ID: <2280@tut.cis.ohio-state.edu> Date: Wed, 25-Nov-87 12:31:26 EST Article-I.D.: tut.2280 Posted: Wed Nov 25 12:31:26 1987 Date-Received: Sun, 29-Nov-87 12:11:11 EST References: <226@tsc.UUCP> <901@csuchico.EDU> Sender: news@tut.cis.ohio-state.edu Reply-To: karl@tut.cis.ohio-state.edu Lines: 34 Keywords: Run this script while su'd. Summary: It's tunable in V.3.1, but for those with previous software... In-reply-to: ronald@csuchico.EDU's message of 22 Nov 87 06:17:29 GMT #!/bin/sh # # ulimit.hack: Create an intermediate program for use in # between kernel initialization and init startup. # Stare at this script a while, then run it. # # Caveat: Heaven help you if you screw this up. This puts # a new program in as /etc/init, which then execs the real init. # cat > ulimit.init.c << \EOF main(argc, argv) int argc; char *argv[]; { ulimit(2, 262144L); /* "2" is the "set" command. */ /* 262,144 allows for 128Mb files to be written. */ /* If that value isn't suitable, roll your own. */ execv("/etc/real.init", argv); } EOF # # Compile it and put it in place of the usual init program. # cc ulimit.init.c -o ulimit.init mv /etc/init /etc/real.init mv ulimit.init /etc/ulimit.init ln /etc/ulimit.init /etc/init mv ulimit.init.c /etc/ulimit.init.c # to keep src for this hack nearby. chmod 0754 /etc/init exit 0 # # Upon system reboot, all processes will inherit the new large ulimit. -=- Karl