るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.020秒)
トップページ > クエリ:status[x] > クエリ:coredump?[x] > 種類:クラス[x]

別のキーワード

  1. _builtin status
  2. openssl status
  3. cgi http_status
  4. getoptlong status_yet
  5. getoptlong status_started

ライブラリ

検索結果

Process::Status (6043.0)

プロセスの終了ステータスを表すクラスです。 メソッド Process.#wait2 などの返り値として使われます。

...使用した例

fork { exit }
Process.wait
case
when $?.signaled?
p "child #{$?.pid} was killed by signal #{$?.termsig}"
if $?.coredump? # システムがこのステータスをサポートしてなければ常にfalse
p "child #{$?.pid} dumped core."
end
when $?.stop...
...
p "child #{$?.pid} was stopped by signal #{$?.stopsig}"
when $?.exited?
p "child #{$?.pid} exited normally. status=#{$?.exitstatus}"
else
p "unknown status %#x" % $?.to_i
end

SIGCHLD を trap する例

trap(:SIGCHLD) {|sig|

puts "interrupted by signal #{sig} at #{calle...
...?.coredump?
puts " child #{$?.pid} dumped core."
end
when $?.stopped?
puts " child #{$?.pid} was stopped by signal #{$?.stopsig}"
when $?.exited?
puts " child #{$?.pid} exited normally. status=#{$?.exitstatus}"
else
p "unknown status...