2012-06-07 (Thu)#1ふと、fork が失敗したときに ruby がどう振る舞うか調べてみた。 % ruby -v ruby 2.0.0dev (2012-01-10 trunk 34265) [x86_64-linux] % for n in {98..90} do ruby -e 'n = ARGV.shift.to_i; p n Process.setrlimit(:NPROC, n) pid = fork { p [:c, $$] } p [:p, pid] Process.wait pid ' $n done 98 [:p, 24982] [:c, 24982] 97 [:p, 24987] [:c, 24987] 96 [:p, 24992] [:c, 24992] 95 [:p, 24997] [FATAL] Failed to create timer thr