Patches: Browse | Submit New | Admin
I am using sys-proctable in long running process in the following way: # a little more complicated, but this will trigger the bug Sys::ProcTable.ps do |pt| break if pt.cmdline.match(/ruby/) end which was preventing the closedir from being called in proctable_ps (linux.c). I wrapped the body of proctable_ps into a new function, proctable_body and use rb_ensure to ensure that even crazy people like me don't leak dir handles.
Add A Comment:
Date: 2009-02-25 15:09 Sender: Daniel Berger Well, the Solaris and Linux versions no longer need to worry about this since they're now pure Ruby. The other platforms on the other hand...
Date: 2008-06-07 12:53 Sender: Daniel Berger I need to revisit this....
Date: 2008-02-12 06:07 Sender: Daniel Berger Applied in CVS (except for the part where the pid and dirhandle were reversed in the argument order). Will be part of the 0.8.0 release once I get similar logic applied to the other platforms. Thanks, Dan
Date: 2008-02-11 21:10 Sender: Daniel Berger Attaching the patch... :) Dan