るりまサーチ

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

別のキーワード

  1. shell/builtin-command new
  2. etc sc_shell
  3. shell/builtin-command each
  4. shell notify
  5. shell verbose

ライブラリ

検索結果

Open3.#pipeline_start(*cmds) -> [Thread] (18122.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。

...境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., o...
...
ドの配列を返します。

例:

require "open3"

# xeyesを10秒だけ実行する。
Open3
.pipeline_start("xeyes") {|ts|
sleep 10
t = ts[0]
Process.kill("TERM", t.pid)
p t.value #=> #<Process::Status: pid 911 SIGTERM (signal 15)>
}

@see Open3.#popen3...

Open3.#pipeline_start(*cmds) {|wait_thrs| ... } -> () (18122.0)

指定したコマンドのリストをパイプで繋いで順番に実行します。

...境変数を Hash で指定します。
cmdname にはコマンド名を表す String を指定します。
1、2、3 は shell 経由で実行されます。

(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., o...
...
ドの配列を返します。

例:

require "open3"

# xeyesを10秒だけ実行する。
Open3
.pipeline_start("xeyes") {|ts|
sleep 10
t = ts[0]
Process.kill("TERM", t.pid)
p t.value #=> #<Process::Status: pid 911 SIGTERM (signal 15)>
}

@see Open3.#popen3...