5件ヒット
[1-5件を表示]
(0.259秒)
ライブラリ
- ビルトイン (5)
クラス
- SystemExit (1)
- Thread (1)
モジュール
- Process (3)
キーワード
- exit (1)
- exit! (1)
-
last
_ status (1) - new (1)
- stop (1)
検索結果
先頭5件
-
Process
. last _ status -> Process :: Status | nil (42682.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 $? -
SystemExit
. new(status = 0 , error _ message = "") -> SystemExit (24343.0) -
SystemExit オブジェクトを生成して返します。
SystemExit オブジェクトを生成して返します。
@param status 終了ステータスを整数で指定します。
@param error_message エラーメッセージを文字列で指定します。
例:
ex = SystemExit.new(1)
p ex.status # => 1 -
Process
. exit!(status = false) -> () (24325.0) -
関数 Kernel.#exit! と同じです。
関数 Kernel.#exit! と同じです。
@param status 終了ステータスを boolean か整数で指定します。true の場合は成功を、false は失敗を意味します。
@see _exit(2) -
Process
. exit(status = true) -> () (24325.0) -
プロセスを終了します。関数 Kernel.#exit と同じです。
プロセスを終了します。関数 Kernel.#exit と同じです。
@param status 終了ステータスを boolean か整数で指定します。true の場合は成功を、false は失敗を意味します。
@see exit(3) -
Thread
. stop -> nil (24022.0) -
他のスレッドから Thread#run メソッドで再起動されるまで、カレ ントスレッドの実行を停止します。
他のスレッドから Thread#run メソッドで再起動されるまで、カレ
ントスレッドの実行を停止します。
//emlist[例][ruby]{
a = Thread.new { print "a"; Thread.stop; print "c" }
sleep 0.1 while a.status!='sleep'
print "b"
a.run
a.join
# => "abc"
//}
@see Thread#run, Thread#wakeup