別のキーワード
クラス
-
PTY
:: ChildExited (12) -
Process
:: Status (180)
キーワード
-
$ ? (12) -
$ CHILD _ STATUS (12) - & (12)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - == (12)
- >> (12)
- Status (12)
- WUNTRACED (12)
- ` (12)
- capture2 (12)
- capture2e (12)
- capture3 (12)
- check (12)
- coredump? (12)
- detach (12)
- exited? (12)
- exitstatus (12)
- inspect (12)
-
last
_ status (8) - pid (12)
- pipeline (12)
-
pipeline
_ r (24) -
pipeline
_ start (24) -
ruby 1
. 8 . 2 feature (12) - signaled? (12)
- status (12)
- stopped? (12)
- stopsig (12)
- success? (12)
- termsig (12)
-
to
_ i (12) -
to
_ s (12) - wait (12)
- wait2 (12)
- waitall (12)
- waitpid (12)
- waitpid2 (12)
検索結果
先頭5件
-
Process
:: Status (23000.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
... -
Process
:: Status # inspect -> String (21024.0) -
自身を人間が読みやすい形の文字列表現にして返します。
...マットで返します。
: 正常終了のとき
#<Process::Status: pid=18262,exited(nnn)>
: シグナルによる停止のとき
#<Process::Status: pid=18262,stopped(SIGxxx=nnn)>
: シグナルによる終了のとき
#<Process::Status: pid=18262,signaled(SIGxxx=nnn)>
: コアダンプした......とき(このステータスの表示はシステムに依存します)
#<Process::Status: pid=18262,coredumped>... -
Process
:: Status # &(other) -> Integer (21000.0) -
self.to_i & other と同じです。 このメソッドは後方互換性のためにあります。
self.to_i & other と同じです。
このメソッドは後方互換性のためにあります。
@param other 自身との & 演算をしたい整数を指定します。 -
Process
:: Status # ==(other) -> bool (21000.0) -
同じステータスの場合に真を返します。
同じステータスの場合に真を返します。
other が数値の場合、self.to_i との比較が行われます。こ
れは後方互換性のためです。
@param other 自身と比較したいオブジェクトを指定します。 -
Process
:: Status # >>(num) -> Integer (21000.0) -
self.to_i >> num と同じです。
self.to_i >> num と同じです。
@param num 整数を指定します。
fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99 -
Process
:: Status # coredump? -> bool (21000.0) -
終了時にコアダンプしていたら真を返します。
終了時にコアダンプしていたら真を返します。
このメソッドは signaled? が真のときにしか意味を持ちません。
このメソッドはシステムに依存します。サポートしないプラットフォー
ムでは常に false を返します。 -
Process
:: Status # exited? -> bool (21000.0) -
プロセスが exit(2) などにより正常に終了した場合に、真を返します。 そうでない場合に false を返します。
プロセスが exit(2) などにより正常に終了した場合に、真を返します。
そうでない場合に false を返します。 -
Process
:: Status # exitstatus -> Integer | nil (21000.0) -
exited? が真の場合プロセスが返した終了ステータスの整数を、そ うでない場合は nil を返します。
exited? が真の場合プロセスが返した終了ステータスの整数を、そ
うでない場合は nil を返します。 -
Process
:: Status # pid -> Integer (21000.0) -
終了したプロセスのプロセス ID を返します。
終了したプロセスのプロセス ID を返します。