3件ヒット
[1-3件を表示]
(0.092秒)
検索結果
-
IO
# pid -> Integer | nil (96730.0) -
自身が IO.popen で作られたIOポートなら、子プロセスのプロセス ID を 返します。それ以外は nil を返します。
自身が IO.popen で作られたIOポートなら、子プロセスのプロセス ID を
返します。それ以外は nil を返します。
@raise IOError 既に close されている場合に発生します。
//emlist[例][ruby]{
IO.popen("-") do |pipe|
if pipe
$stderr.puts "In parent, child pid is #{pipe.pid}" # => In parent, child pid is 16013
else
$stderr.puts "In child, pid is #{$$}" ... -
Process
:: Status (33487.0) -
プロセスの終了ステータスを表すクラスです。 メソッド Process.#wait2 などの返り値として使われます。
プロセスの終了ステータスを表すクラスです。
メソッド Process.#wait2 などの返り値として使われます。
=== 使用例
wait を使用した例
fork { exit }
Process.wait
case
when $?.signaled?
p "child #{$?.pid} was killed by signal #{$?.termsig}"
if $?.coredump? # システムがこのステータスをサポートしてなければ常にfalse
p "child #{$?.pid} dumped core."
end
... -
SignalException
# signm -> String (33037.0) -
self.message のエイリアスです。
self.message のエイリアスです。
//emlist[例][ruby]{
begin
Process.kill('HUP', Process.pid)
sleep
rescue SignalException => e
puts e.signm # => SIGHUP
end
//}