るりまサーチ

最速Rubyリファレンスマニュアル検索!
88件ヒット [1-88件を表示] (0.040秒)
トップページ > クエリ:IO[x] > クエリ:pipe[x] > クエリ:spawn[x]

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io each_line
  5. io readlines

ライブラリ

モジュール

検索結果

Kernel.#spawn(env, program, *args, options={}) -> Integer (18498.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

...
nil とすることで環境変数が削除(unsetenv(3))されます。
//emlist[例][ruby]{
# FOO を BAR にして BAZ を削除する
pid = spawn({"FOO"=>"BAR", "BAZ"=>nil}, command)
//}

親プロセスは Process.#waitpid で子プロセスの終了を待ち合わせるか
もしくは Proc...
...ラム名になります。
また、第1要素はフルパスで指定しなくても環境変数 PATH から探します。

=== option引数の概要
Hash を options として渡すことで、起動される子プロセスの
* プロセスグループ
* resource limit
* カレントデ...
...pid = spawn(command, :close_others=>true) # close 3,4,5,... (default)
pid = spawn(command, :close_others=>false) # don't close 3,4,5,...
//}

これを利用して spawn IO.popen のように使うことができます。
//emlist[][ruby]{
# similar to r = IO.popen(command)
r, w = IO.pipe
pid...
...pid = spawn(command, :close_others=>true) # close 3,4,5,...
pid = spawn(command, :close_others=>false) # don't close 3,4,5,... (default)
//}

これを利用して spawn IO.popen のように使うことができます。
//emlist[][ruby]{
# similar to r = IO.popen(command)
r, w = IO.pipe
pid...

Kernel.#spawn(program, *args) -> Integer (18398.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

...
nil とすることで環境変数が削除(unsetenv(3))されます。
//emlist[例][ruby]{
# FOO を BAR にして BAZ を削除する
pid = spawn({"FOO"=>"BAR", "BAZ"=>nil}, command)
//}

親プロセスは Process.#waitpid で子プロセスの終了を待ち合わせるか
もしくは Proc...
...ラム名になります。
また、第1要素はフルパスで指定しなくても環境変数 PATH から探します。

=== option引数の概要
Hash を options として渡すことで、起動される子プロセスの
* プロセスグループ
* resource limit
* カレントデ...
...pid = spawn(command, :close_others=>true) # close 3,4,5,... (default)
pid = spawn(command, :close_others=>false) # don't close 3,4,5,...
//}

これを利用して spawn IO.popen のように使うことができます。
//emlist[][ruby]{
# similar to r = IO.popen(command)
r, w = IO.pipe
pid...
...pid = spawn(command, :close_others=>true) # close 3,4,5,...
pid = spawn(command, :close_others=>false) # don't close 3,4,5,... (default)
//}

これを利用して spawn IO.popen のように使うことができます。
//emlist[][ruby]{
# similar to r = IO.popen(command)
r, w = IO.pipe
pid...

Kernel.#spawn(command, options={}) -> Integer (18253.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

...接実行されます。


@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise Errno::EXXX 起動に失敗し、ruby インタプリタに制御が戻った場合に発生します。...

Kernel.#spawn(env, command, options={}) -> Integer (18253.0)

引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。

...接実行されます。


@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise Errno::EXXX 起動に失敗し、ruby インタプリタに制御が戻った場合に発生します。...

Kernel.#exec(env, program, *args, options={}) -> () (130.0)

引数で指定されたコマンドを実行します。

...ラムの環境をある程度(ファイルデスクリプタなど)引き継ぎます。
Hash を options として渡すことで、この挙動を変更できます。
詳しくは Kernel.#spawn を参照してください。

=== 引数の解釈

この形式で呼び出した場合、空白や...
...
@param args 渡される引数です。0 個以上の文字列を指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise ArgumentError 第一引数が配列かつ要素数が 2 でない場合に発生します。
@raise Errn...
...替えて以下を実行
$ ps aux|grep sleep
xxxx 32754 0.0 0.0 2580 468 pts/3 S+ 22:01 0:00 mysleep 600
xxxx 32761 0.0 0.0 2824 792 pts/6 S+ 22:01 0:00 grep sleep

@see Kernel.#system,Kernel.#`,Kernel.#spawn,Kernel.#fork,IO.popen,IO.pipe,Kernel.#open,exec(3)...

絞り込み条件を変える

Kernel.#exec(program, *args, options={}) -> () (130.0)

引数で指定されたコマンドを実行します。

...ラムの環境をある程度(ファイルデスクリプタなど)引き継ぎます。
Hash を options として渡すことで、この挙動を変更できます。
詳しくは Kernel.#spawn を参照してください。

=== 引数の解釈

この形式で呼び出した場合、空白や...
...
@param args 渡される引数です。0 個以上の文字列を指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise ArgumentError 第一引数が配列かつ要素数が 2 でない場合に発生します。
@raise Errn...
...替えて以下を実行
$ ps aux|grep sleep
xxxx 32754 0.0 0.0 2580 468 pts/3 S+ 22:01 0:00 mysleep 600
xxxx 32761 0.0 0.0 2824 792 pts/6 S+ 22:01 0:00 grep sleep

@see Kernel.#system,Kernel.#`,Kernel.#spawn,Kernel.#fork,IO.popen,IO.pipe,Kernel.#open,exec(3)...

Kernel.#exec(command, options={}) -> () (105.0)

引数で指定されたコマンドを実行します。

...接実行されます。

@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise Errno::EXXX 起動に失敗し、ruby インタプリタに制御が戻った場合に発生します。...

Kernel.#exec(env, command, options={}) -> () (105.0)

引数で指定されたコマンドを実行します。

...接実行されます。

@param command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise Errno::EXXX 起動に失敗し、ruby インタプリタに制御が戻った場合に発生します。...