method

waitall

v1_8_6_287 - Show latest stable - Class: Process
waitall()
public

Waits for all children, returning an array of pid/status pairs (where status is a Process::Status object).

   fork { sleep 0.2; exit 2 }   #=> 27432
   fork { sleep 0.1; exit 1 }   #=> 27433
   fork {            exit 0 }   #=> 27434
   p Process.waitall

produces:

   [[27434, #<Process::Status: pid=27434,exited(0)>],
    [27433, #<Process::Status: pid=27433,exited(1)>],
    [27432, #<Process::Status: pid=27432,exited(2)>]]