るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.023秒)
トップページ > クエリ:close_write[x] > 種類:モジュール関数[x]

別のキーワード

  1. cgi close
  2. _builtin close
  3. cgi/session close
  4. logger close
  5. zlib close

ライブラリ

モジュール

検索結果

Open3.#popen3(*cmd) -> [IO, IO, IO, Thread] (13.0)

外部プログラム cmd を実行し、そのプロセスの標準入力、標準出力、標準エラー 出力に接続されたパイプと実行したプロセスを待つためのスレッドを 4 要素の 配列で返します。

..., wait_thr|
stdin.puts "stdin"
stdin.close # または close_write
p stdout.read
p stderr.read
}
#=> "stdout\n"
"stderr\n"


stdin への入力が終わったらできる限り早く close か close_write
で閉じるべきです。

[UNIX系OS固有の注意] Open3 で...

Open3.#popen3(*cmd) {|stdin, stdout, stderr, wait_thr| ... } -> () (13.0)

外部プログラム cmd を実行し、そのプロセスの標準入力、標準出力、標準エラー 出力に接続されたパイプと実行したプロセスを待つためのスレッドを 4 要素の 配列で返します。

..., wait_thr|
stdin.puts "stdin"
stdin.close # または close_write
p stdout.read
p stderr.read
}
#=> "stdout\n"
"stderr\n"


stdin への入力が終わったらできる限り早く close か close_write
で閉じるべきです。

[UNIX系OS固有の注意] Open3 で...