検索結果
先頭5件
-
Process
. # waitpid(pid = -1 , flags = 0) -> Integer | nil (15240.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 (3240.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
. # wait(pid = -1 , flags = 0) -> Integer | nil (140.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 (140.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)... -
Kernel
. # fork -> Integer | nil (126.0) -
fork(2) システムコールを使ってプロセスの複製を作 ります。親プロセスでは子プロセスのプロセスIDを、子プロセスでは nil を返します。ブロックを指定して呼び出した場合には、生成し た子プロセスでブロックを評価します。
...の処理
# ...
# 子プロセスの終了を待って終了。
Process.waitpid(child_pid)
else
puts "child process. pid: #{Process.pid}"
# => child process. pid: 81329
# 子プロセスでの処理
sleep(1)
end
//}
//emlist[ブロックを指定した場合][ruby]{
child_pid = fork......# 子プロセスでの処理
sleep(1)
end
puts "parent process. pid: #{Process.pid}, child pid: #{child_pid}"
# => parent process. pid: 79055, child pid: 79602
# 親プロセスでの処理
# ...
# 子プロセスの終了を待って終了。
Process.waitpid(child_pid)
//}
@see IO.popen,... -
Kernel
. # fork { . . . } -> Integer | nil (126.0) -
fork(2) システムコールを使ってプロセスの複製を作 ります。親プロセスでは子プロセスのプロセスIDを、子プロセスでは nil を返します。ブロックを指定して呼び出した場合には、生成し た子プロセスでブロックを評価します。
...の処理
# ...
# 子プロセスの終了を待って終了。
Process.waitpid(child_pid)
else
puts "child process. pid: #{Process.pid}"
# => child process. pid: 81329
# 子プロセスでの処理
sleep(1)
end
//}
//emlist[ブロックを指定した場合][ruby]{
child_pid = fork......# 子プロセスでの処理
sleep(1)
end
puts "parent process. pid: #{Process.pid}, child pid: #{child_pid}"
# => parent process. pid: 79055, child pid: 79602
# 親プロセスでの処理
# ...
# 子プロセスの終了を待って終了。
Process.waitpid(child_pid)
//}
@see IO.popen,...