33件ヒット
[1-33件を表示]
(0.278秒)
検索結果
-
File
:: Stat (14013.0) -
ファイルの情報を格納したオブジェクトのクラス。
...ある場合はそれと同じ働きをします。ただ、
ファイル名を引数に取るかわりに Stat 自身について判定する点が違います。
//emlist[][ruby]{
p File::Stat.new($0).directory? #=> false
p FileTest.directory?($0) #=> false
//}
1.8 以降では、属性メソッ... -
Process
:: Status (14001.0) -
プロセスの終了ステータスを表すクラスです。 メソッド Process.#wait2 などの返り値として使われます。
...ない
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
SIGCHLD を trap する例
trap(:SIGCHLD) {|sig|
puts "interrupted by signal #{sig} at #{ca......d #{$?.pid} was stopped by signal #{$?.stopsig}"
when $?.exited?
puts " child #{$?.pid} exited normally. status=#{$?.exitstatus}"
else
p "unknown status %#x" % $?.to_i
end
end
}
p pid1 = fork { sleep 1; exit }
p pid2 = fork { loop { sleep } } # signal......12965
interrupted by signal 17 at -:27:in `sleep'
child 12965 was stopped by signal 19
interrupted by signal 17 at -:30:in `sleep'
child 12965 was killed by signal 15
interrupted by signal 17 at -:30:in `sleep'
child 12964 exited normally. status=0
done... -
File (8019.0)
-
ファイルアクセスのためのクラスです。
...。
通常 Kernel.#open または File.open を使って生成します。
IO クラスがインクルードしている File::Constants は File クラスに関係する定数を
格納したモジュールです。
また File::Stat は stat 構造体( stat(2) 参照)を表すクラスです。...