public static IRubyObject waitall(Ruby runtime) {
POSIX posix = runtime.getPosix();
RubyArray results = runtime.newArray();
int[] status = new int[1];
int result = posix.wait(status);
while (result != -1) {
results.append(runtime.newArray(runtime.newFixnum(result), RubyProcess.RubyStatus.newProcessStatus(runtime, (status[0] >> 8) & 0xff, result)));
result = posix.wait(status);
}