440件ヒット
[1-100件を表示]
(0.024秒)
クラス
-
PTY
:: ChildExited (11) -
Process
:: Status (165)
キーワード
-
$ ? (11) -
$ CHILD _ STATUS (11) - & (11)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - == (11)
- >> (11)
-
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) - Status (11)
- WUNTRACED (11)
- capture2 (11)
- capture2e (11)
- capture3 (11)
- check (11)
- coredump? (11)
- detach (11)
- exit (11)
- exit! (11)
- exited? (11)
- exitstatus (11)
- inspect (11)
-
last
_ status (7) - pid (11)
- pipeline (11)
-
rb
_ protect (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) - signaled? (11)
- stopped? (11)
- stopsig (11)
- success? (11)
-
terminate
_ process (11) - termsig (11)
-
to
_ i (11) -
to
_ s (11) - wait (11)
- wait2 (11)
- waitall (11)
- waitpid (11)
- waitpid2 (11)
検索結果
先頭5件
-
PTY
:: ChildExited # status -> Process :: Status (18318.0) -
子プロセスの終了ステータスをProcess::Statusオブジェクトで返します。
...子プロセスの終了ステータスをProcess::Statusオブジェクトで返します。... -
Process
:: Status # exitstatus -> Integer | nil (12100.0) -
exited? が真の場合プロセスが返した終了ステータスの整数を、そ うでない場合は nil を返します。
exited? が真の場合プロセスが返した終了ステータスの整数を、そ
うでない場合は nil を返します。 -
Process
. last _ status -> Process :: Status | nil (9326.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 $?... -
Process
:: Status (9030.0) -
プロセスの終了ステータスを表すクラスです。 メソッド Process.#wait2 などの返り値として使われます。
...プロセスの終了ステータスを表すクラスです。
メソッド Process.#wait2 などの返り値として使われます。
=== 使用例
wait を使用した例
fork { exit }
Process.wait
case
when $?.signaled?
p "child #{$?.pid} was killed by signal #{$?.termsig}"......stopped?
# 実際には Process.wait を使用しているので、ここに来ることはない
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
SIGC......了に対して1つの SIGCHLD しか届かない
# 場合があるのでループさせる必要があります
while Process.waitpid(-1, Process::WNOHANG|Process::WUNTRACED)
case
when $?.signaled?
puts " child #{$?.pid} was killed by signal #{$?.termsig}"
if... -
Kernel
$ $ CHILD _ STATUS -> Process :: Status | nil (6308.0) -
$? の別名
...$? の別名
require "English"
out = `wget https://www.ruby-lang.org/en/about/license.txt -O - 2>/dev/null`
if $CHILD_STATUS.to_i == 0
print "wget success\n"
out.split(/\n/).each { |line|
printf "%s\n", line
}
else
print "wget failed\n"
end... -
static void terminate
_ process(int status , const char *mesg , int mlen) (6200.0) -
-
Process
:: Status # inspect -> String (6024.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 (6000.0) -
self.to_i & other と同じです。 このメソッドは後方互換性のためにあります。
self.to_i & other と同じです。
このメソッドは後方互換性のためにあります。
@param other 自身との & 演算をしたい整数を指定します。 -
Process
:: Status # ==(other) -> bool (6000.0) -
同じステータスの場合に真を返します。
同じステータスの場合に真を返します。
other が数値の場合、self.to_i との比較が行われます。こ
れは後方互換性のためです。
@param other 自身と比較したいオブジェクトを指定します。 -
Process
:: Status # >>(num) -> Integer (6000.0) -
self.to_i >> num と同じです。
...self.to_i >> num と同じです。
@param num 整数を指定します。
fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99...