Permalink
Browse files

Ensure child workers are waidpid'd

  • Loading branch information...
1 parent 7a7e676 commit 6ce17bf19b3227d4952cf2146c2a1b5d59c872f4 @airhorns committed Jul 13, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/sprockets/rails/static_compiler_extensions.rb
@@ -61,7 +61,7 @@ def compile_with_workers
Timeout::timeout 5 do
# Sync workers by blocking on a recieve from each one
worker_count.times do |i|
- pid = ''
+ pid = ""
receiver.recv_string(pid)
end
end
@@ -75,10 +75,10 @@ def compile_with_workers
result = Marshal.load(string)
manifest.update result
end
-
ensure
if workers
workers.each {|pid| sender.send_string(KILL_MESSAGE) }
+ workers.each {|pid| Process.waitpid(pid) }
end
end
write_manifest(manifest) if @manifest

0 comments on commit 6ce17bf

Please sign in to comment.