why does this not blow up?
cfp:~ > cat a.rb
require ‘yaml’
factor = 100000000000000000
soft, hard = Process.getrlimit Process::RLIMIT_RSS
y ‘soft’ => soft, ‘hard’ => hard
Process.setrlimit Process::RLIMIT_RSS, soft/factor, hard/factor
soft, hard = Process.getrlimit Process::RLIMIT_RSS
y ‘soft’ => soft, ‘hard’ => hard
s = 42.chr * (soft + 1)
s[-1]
cfp:~ > sudo ruby a.rb; echo $?
hard: 9223372036854775807
soft: 9223372036854775807
hard: 92
soft: 92
0
i sort of expect this to get signaled and throw an exception?
cheers
a @ http://drawohara.com/
On Jan 14, 7:42 pm, “ara.t.howard” [email protected] wrote:
Process.setrlimit Process::RLIMIT_RSS, soft/factor, hard/factor
soft: 9223372036854775807
hard: 92
soft: 92
0
i sort of expect this to get signaled and throw an exception?
What platform?
Dan
On Jan 14, 2008, at 8:07 PM, Daniel B. wrote:
What platform?
osx - tiger
a @ http://drawohara.com/
On Jan 14, 8:28 pm, “ara.t.howard” [email protected] wrote:
On Jan 14, 2008, at 8:07 PM, Daniel B. wrote:
What platform?
osx - tiger
setrlimit() doesn’t work on OS X.
Regards,
Dan
ara.t.howard wrote:
On Jan 14, 2008, at 10:17 PM, Daniel B. wrote:
setrlimit() doesn’t work on OS X.
well gosh - that’d explain it - doh!
seriously though - you’d think it’d throw like fork does on windows
though eh?
You would think. I’ve hit other situations like this with OS X, too.
Regards,
Dan
On Jan 14, 2008, at 10:17 PM, Daniel B. wrote:
setrlimit() doesn’t work on OS X.
well gosh - that’d explain it - doh!
seriously though - you’d think it’d throw like fork does on windows
though eh?
thanks a bunch!
a @ http://codeforpeople.com/