Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!ariel.ucs.unimelb.EDU.AU!werple.apana.org.au!hal9000!cleese!cleese!not-for-mail From: newton@cleese.apana.org.au (Mark Newton) Newsgroups: comp.os.386bsd.questions,demon.ip.support.unix Subject: Re: tin says out of memory Date: 11 Aug 1993 19:05:04 +0930 Organization: cleese.apana.org.au public access UNIX Lines: 34 Message-ID: <24aegp$cdf@cleese.apana.org.au> References: <CAnCpz.E30@demon.co.uk> <CB8wzB.EFI@demon.co.uk> <23pfv1$gc@azrael.demon.co.uk> NNTP-Posting-Host: cleese.apana.org.au In article <23pfv1$gc@azrael.demon.co.uk> blade@azrael.demon.co.uk (Ji Kim) writes: >or alternatively use a C proggie to set the limit using setrlimit,eg. > >#include <sys/time.h> >#include <sys/resource.h> > >main() >{ > > struct rlimit tmp; > > tmp.rlim_cur=RLIM_INFINITY; > tmp_rlim_max=RLIM_INFINITY; > > setrlimit(RLIMIT_DATA,&tmp); > >} > > >Hope this helps, That won't actually work -- The effects of setrlimit() would disappear as soon as main() exited. setrlimit() affects the current process and all of its children. Executing setrlimit() then exiting the program is analogous to executing chdir() then bailing out; it just doesn't work. - mark -- -------------------------------------------------------------------- I tried an internal modem, newton@cleese.apana.org.au but it hurt when I walked. Mark Newton ----- Voice: +61-8-3224071 --------------- Data: +61-8-3222915 -----