From: John Wells Date: 2008-01-02T12:38:27+09:00 Subject: Re: Modifying parent shell's attributes? On 1/1/08, Gary Wright wrote: > > On Jan 1, 2008, at 9:59 PM, John Wells wrote: > > > > I have tried: > > > > Process.setrlimit Process::RLIMIT_STACK, Process::RLIM_INFINITY, > > Process::RLIM_INFINITY > > Process.setrlimit Process::RLIMIT_STACK, 0, Process::RLIM_INFINITY > > > > It looks like you are trying to increase the max stack size > to RLIM_INFINITY, which can only be done if you have super-user > access. What you want to do is to just raise the soft-limit. Try the > following in IRB and see if it works on your system: > > >> include Process > => Object > >> s = getrlimit RLIMIT_STACK > => [8388608, 67108864] > >> setrlimit RLIMIT_STACK, s.first*2, s.last > => nil > >> getrlimit RLIMIT_STACK > => [16777216, 67108864] > >> I'm on Linux, and I've even done this: Process.setrlimit Process::RLIMIT_STACK, 18446744073709551615, 18446744073709551615 And, based on what getrlimit says, it worked. However, same exception. Even doing it as root, nothing else seems to work but ulimit -s 16000 from parent shell. ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux]