Class: Root::Processes
Instance Method Summary collapse
-
#initialize ⇒ Processes
constructor
A new instance of Processes.
- #join ⇒ Object
- #launch ⇒ Object
Methods inherited from Array
Constructor Details
#initialize ⇒ Processes
Returns a new instance of Processes.
13 14 |
# File 'lib/sub/root.rb', line 13 def initialize end |
Instance Method Details
#join ⇒ Object
23 24 25 26 27 |
# File 'lib/sub/root.rb', line 23 def join self.each do |pid| Process.waitpid(pid, 0) end end |
#launch ⇒ Object
16 17 18 19 20 21 |
# File 'lib/sub/root.rb', line 16 def launch pid = fork do yield end self << pid end |