22件ヒット
[1-22件を表示]
(0.035秒)
検索結果
-
Open3
. # pipeline _ start(*cmds) -> [Thread] (18120.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。
...。
@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。......(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]
@return ブロックを指定した場合はブロックの最後に評価された値を返します。
ブロッ......を待つためのスレッ
ドの配列を返します。
例:
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)>
}... -
Open3
. # pipeline _ start(*cmds) {|wait _ thrs| . . . } -> () (18120.0) -
指定したコマンドのリストをパイプで繋いで順番に実行します。
...。
@param cmds 実行するコマンドのリストを指定します。それぞれのコマンドは
以下のように String か Array で指定します。
commandline にはコマンド全体(例. "nroff -man")を表す
String を指定します。......(1) commandline
(2) [commandline, options]
(3) [env, commandline, options]
(4) [env, cmdname, arg1, arg2, ..., options]
(5) [env, [cmdname, argv0], arg1, ..., options]
@return ブロックを指定した場合はブロックの最後に評価された値を返します。
ブロッ......を待つためのスレッ
ドの配列を返します。
例:
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)>
}...