22件ヒット
[1-22件を表示]
(0.032秒)
クラス
- IO (22)
キーワード
- fcntl (11)
-
write
_ nonblock (11)
検索結果
先頭2件
-
IO
# write _ nonblock(string , exception: true) -> Integer | :wait _ writable (6211.0) -
IO をノンブロッキングモードに設定し、string を write(2) システムコールで書き出します。
...CK である場合は、
その例外オブジェクトに IO::WaitWritable が Object#extend
されます。よって IO::WaitWritable を write_nonblock のリトライが必要
かの判定に用いることができます。
@param string 自身に書き込みたい文字列を指定します... -
IO
# fcntl(cmd , arg = 0) -> Integer (110.0) -
IOに対してシステムコール fcntl を実行します。 機能の詳細は fcntl(2) を参照してください。 fcntl(2) が返した整数を返します。
...に発生します。
//emlist[例][ruby]{
require "fcntl"
IO.write("testfile", "abcde")
# ファイル状態フラグを読み出す
File.open("testfile") do |f|
f.fcntl(Fcntl::F_GETFL, 0) # => 0
f.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK) # => 0
f.fcntl(Fcntl::F_GETFL, 0) # => 4
end
//}...