diff options
| author | Luke Kanies <luke@madstop.com> | 2008-08-18 19:15:24 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-08-18 19:15:24 -0500 |
| commit | d24504e83acd0bf210fb643d6c9f0cc2e6eae6c0 (patch) | |
| tree | 3e2d4ba63ba0180536a0c906c7fed0cc83527cfc /lib | |
| parent | bd87aa049a4ea831e9bdc130e5134b4e4e5a8387 (diff) | |
Added a Process.waitall thread when there's a timeout, to avoid zombies.
Without this call, every time there's a timeout, we'll get a zombie.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/facter/util/resolution.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/facter/util/resolution.rb b/lib/facter/util/resolution.rb index 19f2c1e..b50c9e9 100644 --- a/lib/facter/util/resolution.rb +++ b/lib/facter/util/resolution.rb @@ -121,6 +121,11 @@ class Facter::Util::Resolution end rescue Timeout::Error => detail warn "Timed out seeking value for %s" % self.name + + # This call avoids zombies -- basically, create a thread that will + # dezombify all of the child processes that we're ignoring because + # of the timeout. + Thread.new { Process.waitall } return nil end |
