別のキーワード
クラス
-
PTY
:: ChildExited (11) -
Process
:: Status (44) - SystemExit (22)
- Thread (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - >> (11)
- OCSP (11)
- Status (11)
- capture2e (11)
- capture3 (11)
- detach (11)
- exit! (22)
- exited? (11)
- exitstatus (11)
-
last
_ status (7) -
localjump
_ exitstatus (11) - new (11)
- pipeline (11)
-
pipeline
_ r (22) -
rb
_ exit (11) -
ruby 1
. 6 feature (11) - sh (11)
-
to
_ i (11) - wait (11)
- wait2 (11)
- waitall (11)
- waitpid (11)
- waitpid2 (11)
検索結果
先頭5件
-
PTY
:: ChildExited # status -> Process :: Status (21218.0) -
子プロセスの終了ステータスをProcess::Statusオブジェクトで返します。
...子プロセスの終了ステータスをProcess::Statusオブジェクトで返します。... -
SystemExit
# status -> Integer (21131.0) -
例外オブジェクトに保存された終了ステータスを返します。
...します。
終了ステータスは Kernel.#exit や SystemExit.new などで設定されます。
例:
begin
exit 1
rescue SystemExit => err
p err.status # => 1
end
begin
raise SystemExit.new(1, "dummy exit")
rescue SystemExit => err
p err.status # => 1
end... -
Kernel
. # exit(status = true) -> () (18272.0) -
Rubyプログラムの実行を終了します。status として整 数が与えられた場合、その値を Ruby コマンドの終了ステータスとします。 デフォルトの終了ステータスは 0(正常終了)です。
...Rubyプログラムの実行を終了します。status として整
数が与えられた場合、その値を Ruby コマンドの終了ステータスとします。
デフォルトの終了ステータスは 0(正常終了)です。
status が true の場合 0、 false の場合 1 を引数に......の定数
EXIT_SUCCESS、EXIT_FAILURE の値なので、正確には環境依存です。
exit は例外 SystemExit を発生させ
ることによってプログラムの実行を終了させますので、
必要に応じて begin 節で捕捉することができます。
@param status 終了........'
exit
rescue SystemExit => err
puts "end1 with #{err.inspect}"
end
begin
puts 'start2...'
exit
ensure
puts 'end2...'
end
puts 'end' #実行されない
#=> start
# start1...
# end1 with #<SystemExit: exit>
# start2...
# end2...
#終了ステータス:0
//}
@see Kernel.#exit!,... -
Process
. exit(status = true) -> () (18230.0) -
プロセスを終了します。関数 Kernel.#exit と同じです。
...プロセスを終了します。関数 Kernel.#exit と同じです。
@param status 終了ステータスを boolean か整数で指定します。true の場合は成功を、false は失敗を意味します。
@see exit(3)... -
Thread
# status -> String | false | nil (18137.0) -
生きているスレッドの状態を文字列 "run"、"sleep", "aborting" のいず れかで返します。正常終了したスレッドに対して false、例外によ り終了したスレッドに対して nil を返します。
...ead.new { Thread.exit }
d = Thread.new { sleep }
d.kill #=> #<Thread:0x401b3678 aborting>
a.status #=> nil
b.status #=> "sleep"
c.status #=> false
d.status #=> "aborting"
Thread.current.status #=> "run"
@se... -
Process
:: Status # exitstatus -> Integer | nil (15200.0) -
exited? が真の場合プロセスが返した終了ステータスの整数を、そ うでない場合は nil を返します。
...
exited? が真の場合プロセスが返した終了ステータスの整数を、そ
うでない場合は nil を返します。... -
static VALUE localjump
_ exitstatus(VALUE exc) (12200.0) -
-
Process
:: Status # exited? -> bool (9116.0) -
プロセスが exit(2) などにより正常に終了した場合に、真を返します。 そうでない場合に false を返します。
...プロセスが exit(2) などにより正常に終了した場合に、真を返します。
そうでない場合に false を返します。... -
Kernel
. # exit!(status = false) -> () (6272.0) -
Rubyプログラムの実行を即座に終了します。 status として整数が与えられた場合、その値を Ruby コマンドの終了ステータスとします。 デフォルトの終了ステータスは 1 です。
...Rubyプログラムの実行を即座に終了します。
status として整数が与えられた場合、その値を Ruby コマンドの終了ステータスとします。
デフォルトの終了ステータスは 1 です。
status が true の場合 0、 false の場合 1 を引数に指......ベルの定数
EXIT_SUCCESS、EXIT_FAILURE の値なので、正確には環境依存です。
exit! は exit とは違って、例外処理などは一切行ないませ
ん。 Kernel.#fork の後、子プロセスを終了させる時などに用
いられます。
@param status 終了ステー......T.sync = true #表示前に終了しないようにする
puts 'start'
begin
puts 'start1...'
exit!
ensure
puts 'end1...' #実行されない
end
puts 'end' #実行されない
#=> start
# start1...
#終了ステータス:1
//}
@see Kernel.#exit,Kernel.#abort,Kernel.#at_exit,Kernel.#fork... -
Process
. last _ status -> Process :: Status | nil (6238.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 $?...