るりまサーチ

最速Rubyリファレンスマニュアル検索!
7件ヒット [1-7件を表示] (0.028秒)
トップページ > モジュール:Process[x] > クエリ:status[x] > クエリ:pid[x] > クエリ:last_status[x]

別のキーワード

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

ライブラリ

検索結果

Process.last_status -> Process::Status | nil (24346.0)

カレントスレッドで最後に終了した子プロセスのステータスを返します。

...す。

Process
.wait Process.spawn("ruby", "-e", "exit 13")
Process
.last_status # => #<Process::Status: pid 4825 exit 13>

カレントスレッドで子プロセスを実行したことがない場合は nil を返します。

Process
.last_status # => nil

@see Process::Status
@see $?...