24件ヒット
[1-24件を表示]
(0.023秒)
検索結果
先頭2件
-
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 で...