From: Eric Schwartz Date: 2002-12-18T08:07:45+09:00 Subject: forking with block leaves zombie procs I'm still in the process of reducing this to a simple test case, but I thought I'd post and see if anybody had suggestions. I am starting a bunch of test cases, and then forking to wait on the success or failure of the tests. Currently, it looks something like: test_list.each {|test| start_test(test, machine) fork { sleep 20 while !test_finished(test, machine) get_test_logfiles(test, machine) exit(0) } } However, every time I run this code, I get a zombie process sitting around, waiting for init to reap it. If I'm running a bunch of tests, this can get really annoying, and clutters up the process table something fierce. Any ideas on how to prevent this happening? I tried nesting fork blocks, but that didn't work. This isn't a ruby-specific issue, I don't think (unless it's something to do with forking with blocks instead of using fork()), but I've a mental block on where to proceed. -=Eric -- Come to think of it, there are already a million monkeys on a million typewriters, and Usenet is NOTHING like Shakespeare. -- Blair Houghton.