Skip to content

Commit

Permalink
clear resources in the child in case somebody spawns in the child
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://rubyforge.org/var/svn/spawn/spawn@38 2aabfe31-cc40-457c-aec7-21ad9ce7fb7d
  • Loading branch information
tra committed Mar 9, 2009
1 parent 368583b commit 55a60f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/spawn.rb
Expand Up @@ -30,6 +30,8 @@ def self.close_resources
@@resources.each do |resource|
resource.close if resource && resource.respond_to?(:close) && !resource.closed?
end
# in case somebody spawns recursively
@@resources.clear
end

# Spawns a long-running section of code and returns the ID of the spawned process.
Expand Down

0 comments on commit 55a60f6

Please sign in to comment.