132件ヒット
[1-100件を表示]
(0.018秒)
別のキーワード
検索結果
先頭5件
-
Kernel
. # exec(command , options={}) -> () (13.0) -
引数で指定されたコマンドを実行します。
...、このメソッドからは戻りません。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されま... -
Kernel
. # exec(env , command , options={}) -> () (13.0) -
引数で指定されたコマンドを実行します。
...、このメソッドからは戻りません。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されま... -
Kernel
. # spawn(command , options={}) -> Integer (13.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
...プロセスのプロセスIDを返します。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されま... -
Kernel
. # spawn(env , command , options={}) -> Integer (13.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
...プロセスのプロセスIDを返します。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されま... -
Kernel
. # system(command , options={}) -> bool | nil (13.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...$? を参照することで判別可能です。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されま... -
Kernel
. # system(env , command , options={}) -> bool | nil (13.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...$? を参照することで判別可能です。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されま... -
Kernel
. # exec(env , program , *args , options={}) -> () (3.0) -
引数で指定されたコマンドを実行します。
引数で指定されたコマンドを実行します。
プロセスの実行コードはそのコマンド(あるいは shell)になるので、
起動に成功した場合、このメソッドからは戻りません。
この形式では、常に shell を経由せずに実行されます。
exec(3) でコマンドを実行すると、
元々のプログラムの環境をある程度(ファイルデスクリプタなど)引き継ぎます。
Hash を options として渡すことで、この挙動を変更できます。
詳しくは Kernel.#spawn を参照してください。
=== 引数の解釈
この形式で呼び出した場合、空白や shell のメタキャラクタも
そのまま program ... -
Kernel
. # exec(program , *args , options={}) -> () (3.0) -
引数で指定されたコマンドを実行します。
引数で指定されたコマンドを実行します。
プロセスの実行コードはそのコマンド(あるいは shell)になるので、
起動に成功した場合、このメソッドからは戻りません。
この形式では、常に shell を経由せずに実行されます。
exec(3) でコマンドを実行すると、
元々のプログラムの環境をある程度(ファイルデスクリプタなど)引き継ぎます。
Hash を options として渡すことで、この挙動を変更できます。
詳しくは Kernel.#spawn を参照してください。
=== 引数の解釈
この形式で呼び出した場合、空白や shell のメタキャラクタも
そのまま program ... -
Kernel
. # spawn(env , program , *args , options={}) -> Integer (3.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
...アします。
//emlist[][ruby]{
# すべての環境変数をクリア
pid = spawn(command, :unsetenv_others=>true)
# FOO だけ
pid = spawn({"FOO"=>"BAR"}, command, :unsetenv_others=>true)
//}
「:pgroup」でプロセスグループを指定できます。
//emlist[][ruby]{
# true, 0 で新し......数2つの配列、を渡すことができます。
それぞれ Process.#setrlimit の引数が2個、3個の場合に対応します。
//emlist[][ruby]{
# 現プロセスの core の resource limit を取得
cur, max = Process.getrlimit(:CORE)
# 一時的に子プロセスの core dump を止め......で子プロセスのカレントディレクトリを変更できます。
//emlist[][ruby]{
pid = spawn(command, :chdir=>"/var/tmp")
//}
「:umask」で子プロセスの umask を指定できます。
//emlist[][ruby]{
pid = spawn(command, :umask=>077)
//}
リダイレクトは様々なやり... -
Kernel
. # spawn(program , *args) -> Integer (3.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
...アします。
//emlist[][ruby]{
# すべての環境変数をクリア
pid = spawn(command, :unsetenv_others=>true)
# FOO だけ
pid = spawn({"FOO"=>"BAR"}, command, :unsetenv_others=>true)
//}
「:pgroup」でプロセスグループを指定できます。
//emlist[][ruby]{
# true, 0 で新し......数2つの配列、を渡すことができます。
それぞれ Process.#setrlimit の引数が2個、3個の場合に対応します。
//emlist[][ruby]{
# 現プロセスの core の resource limit を取得
cur, max = Process.getrlimit(:CORE)
# 一時的に子プロセスの core dump を止め......で子プロセスのカレントディレクトリを変更できます。
//emlist[][ruby]{
pid = spawn(command, :chdir=>"/var/tmp")
//}
「:umask」で子プロセスの umask を指定できます。
//emlist[][ruby]{
pid = spawn(command, :umask=>077)
//}
リダイレクトは様々なやり...