検索結果
先頭5件
- Process
. # wait(pid = -1 , flags = 0) -> Integer | nil - Process
. # wait2(pid = -1 , flags = 0) -> [Integer , Process :: Status] | nil - Process
. # waitpid(pid = -1 , flags = 0) -> Integer | nil - Process
. # waitpid2(pid = -1 , flags = 0) -> [Integer , Process :: Status] | nil - Process
. # waitall -> [[Integer , Process :: Status]]
-
Process
. # wait(pid = -1 , flags = 0) -> Integer | nil (18241.0) -
pid で指定される特定の子プロセスの終了を待ち、そのプロセスが 終了した時に pid を返します。 wait2, waitpid2 は子プロセスの pid と終了ステータスを表す Process::Status オブジェクトの配列を返します。 ノンブロッキングモードで子プロセスがまだ終了していない時には nil を返します。
...pid で指定される特定の子プロセスの終了を待ち、そのプロセスが
終了した時に pid を返します。
wait2, waitpid2 は子プロセスの pid と終了ステータスを表す
Process::Status オブジェクトの配列を返します。
ノンブロッキングモー......。waitpid(2) か wait4(2) の実装されていないマシンでは
flags はいつも nil または 0 を指定する必要があります。
@raise Errno::ECHILD 子プロセスが存在しない場合に発生します。
//emlist[][ruby]{
pid = fork { sleep 1 }
Process.wait2 # =......> [70024, #<Process::Status: pid 70024 exit 0>]
//}
@see wait(2), waitpid(2)... -
Process
. # wait2(pid = -1 , flags = 0) -> [Integer , Process :: Status] | nil (6241.0) -
pid で指定される特定の子プロセスの終了を待ち、そのプロセスが 終了した時に pid を返します。 wait2, waitpid2 は子プロセスの pid と終了ステータスを表す Process::Status オブジェクトの配列を返します。 ノンブロッキングモードで子プロセスがまだ終了していない時には nil を返します。
...pid で指定される特定の子プロセスの終了を待ち、そのプロセスが
終了した時に pid を返します。
wait2, waitpid2 は子プロセスの pid と終了ステータスを表す
Process::Status オブジェクトの配列を返します。
ノンブロッキングモー......。waitpid(2) か wait4(2) の実装されていないマシンでは
flags はいつも nil または 0 を指定する必要があります。
@raise Errno::ECHILD 子プロセスが存在しない場合に発生します。
//emlist[][ruby]{
pid = fork { sleep 1 }
Process.wait2 # =......> [70024, #<Process::Status: pid 70024 exit 0>]
//}
@see wait(2), waitpid(2)... -
Process
. # waitpid(pid = -1 , flags = 0) -> Integer | nil (6241.0) -
pid で指定される特定の子プロセスの終了を待ち、そのプロセスが 終了した時に pid を返します。 wait2, waitpid2 は子プロセスの pid と終了ステータスを表す Process::Status オブジェクトの配列を返します。 ノンブロッキングモードで子プロセスがまだ終了していない時には nil を返します。
...pid で指定される特定の子プロセスの終了を待ち、そのプロセスが
終了した時に pid を返します。
wait2, waitpid2 は子プロセスの pid と終了ステータスを表す
Process::Status オブジェクトの配列を返します。
ノンブロッキングモー......。waitpid(2) か wait4(2) の実装されていないマシンでは
flags はいつも nil または 0 を指定する必要があります。
@raise Errno::ECHILD 子プロセスが存在しない場合に発生します。
//emlist[][ruby]{
pid = fork { sleep 1 }
Process.wait2 # =......> [70024, #<Process::Status: pid 70024 exit 0>]
//}
@see wait(2), waitpid(2)... -
Process
. # waitpid2(pid = -1 , flags = 0) -> [Integer , Process :: Status] | nil (6241.0) -
pid で指定される特定の子プロセスの終了を待ち、そのプロセスが 終了した時に pid を返します。 wait2, waitpid2 は子プロセスの pid と終了ステータスを表す Process::Status オブジェクトの配列を返します。 ノンブロッキングモードで子プロセスがまだ終了していない時には nil を返します。
...pid で指定される特定の子プロセスの終了を待ち、そのプロセスが
終了した時に pid を返します。
wait2, waitpid2 は子プロセスの pid と終了ステータスを表す
Process::Status オブジェクトの配列を返します。
ノンブロッキングモー......。waitpid(2) か wait4(2) の実装されていないマシンでは
flags はいつも nil または 0 を指定する必要があります。
@raise Errno::ECHILD 子プロセスが存在しない場合に発生します。
//emlist[][ruby]{
pid = fork { sleep 1 }
Process.wait2 # =......> [70024, #<Process::Status: pid 70024 exit 0>]
//}
@see wait(2), waitpid(2)... -
Process
. # waitall -> [[Integer , Process :: Status]] (6202.0) -
全ての子プロセスが終了するのを待ちます。 終了した子プロセスの pid と終了ステータス (Process::Status) の配列の配列を返します。 子プロセスがいない状態でこのメソッドを呼び出すと空の配列を返します。
...配列を返します。
$? には最後に終了した子プロセスの Process::Status オブジェクトが設定されます。
2.times {|n|
Process.fork() { exit n }
}
p Process.waitall
#=> :Status: pid=2766,exited(1)>], [2765, #<Process::Status: pid=2765,exited(1)>...