Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!mcnc!ncsuvx!ncsugn!emigh From: emigh@ncsugn.ncsu.edu (Ted H. Emigh) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: How to set ulimit in SysV Message-ID: <674@ncsugn.ncsu.edu> Date: Sun, 11-Oct-87 20:12:26 EDT Article-I.D.: ncsugn.674 Posted: Sun Oct 11 20:12:26 1987 Date-Received: Tue, 13-Oct-87 00:57:47 EDT References: <1408@dasys1.UUCP> <6475@brl-smoke.ARPA> <6502@brl-smoke.ARPA> <275@minya.UUCP> Reply-To: emigh@ncsugn.UUCP (Ted H. Emigh) Organization: Genetics, North Carolina State University, Raleigh, NC Lines: 49 Keywords: patch ulimit Xref: mnetor comp.unix.wizards:4836 comp.unix.questions:4497 In article <275@minya.UUCP> jc@minya.UUCP (jc) writes: >> >As for the original problem, can't superuser set the ligit up as >> >well as down? >> >> That IS the original problem! ONLY the super-user can get around >> the ridiculously small initial ulimit coded into the kernel! > >What you do is change your inittab entries for getty to: > > t3:2:respawn:/bin/sh /etc/Getty tty03 tty03 > >The /etc/Getty script looks like: > > ulimit 8000 # or whatever you like. > exec /etc/getty $* > ncsugn has been using the following program for some 5 months -- the original came from the net from some person at AT&T. ncsugn is a 3B2/400 running SVR3.0. /* Change the file size limit Compile this 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/init chmod 754 /etc/init <-- Same as the old init The next time the machine is booted, the ulimit will be changed. */ main(argc, argv) int argc; char *argv[]; { ulimit(2, 32768L); /* "2" sets ulimit. 32768 = 16Mb. */ execv("/etc/real.init", argv); } -------------------- -- Ted H. Emigh, Dept. Genetics and Statistics, NCSU, Raleigh, NC uucp: mcnc!ncsuvx!ncsugn!emigh internet: emigh%ncsugn.ncsu.edu BITNET: NEMIGH@TUCC @ncsuvx.ncsu.edu:emigh@ncsugn.ncsu.edu