240件ヒット
[1-100件を表示]
(0.043秒)
モジュール
- Kernel (60)
-
Process
:: Sys (180)
検索結果
先頭5件
-
Kernel
. # syscall(num , *arg) -> Integer (6109.0) -
numで指定された番号のシステムコールを実行します。 第2引数以降をシステムコールの引数として渡します。
...して渡します。
どの数値がどのシステムコールに対応するかは、
syscall(2) や
/usr/include/sys/syscall.h を参照してください。
システムコールの慣習に従い、syscall(2)
が -1 を返す場合には例外 Errno::EXXX が発生します。
それ以外......X syscall(2) が -1 を返した場合に発生します。
@raise NotImplementedError 実行環境がこのメソッドに対応していないとき発生します。
//emlist[例][ruby]{
syscall 4, 1, "hello\n", 6 # '4' is write(2) on our box
# => hello
//}
@see fiddle, syscall(2freebsd), sys... -
Kernel
. # system(command , options={}) -> bool | nil (6103.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)......ェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
//emlist[exceptionオプションを指定][ruby]{
system("sad", exception: true) # => Errno::ENOENT (No such file or directory - sad)
system('ruby -e "exit(false)"', exception: tru......e) # => RuntimeError (Command failed with exit 1: ruby -e "exit(false)")
system('ruby -e "exit(true)"', exception: true) # => true
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , command , options={}) -> bool | nil (6103.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)......ェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
//emlist[exceptionオプションを指定][ruby]{
system("sad", exception: true) # => Errno::ENOENT (No such file or directory - sad)
system('ruby -e "exit(false)"', exception: tru......e) # => RuntimeError (Command failed with exit 1: ruby -e "exit(false)")
system('ruby -e "exit(true)"', exception: true) # => true
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , program , *args , options={}) -> bool | nil (6103.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...s オプションパラメータ Hash
@raise ArgumentError 第一引数が配列かつ要素数が 2 でない場合に発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)......se RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(program , *args , options={}) -> bool | nil (6103.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...s オプションパラメータ Hash
@raise ArgumentError 第一引数が配列かつ要素数が 2 でない場合に発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)......se RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Process
:: Sys . # getegid -> Integer (3003.0) -
システムコールの getegid(2) を呼びます。返り値を整数で返します。
システムコールの getegid(2) を呼びます。返り値を整数で返します。
@raise NotImplementedError システムコールが現在のプラットフォームで提供されていない場合に発生します。 -
Process
:: Sys . # geteuid -> Integer (3003.0) -
システムコールの geteuid(2) を呼びます。返り値を整数で返します。
システムコールの geteuid(2) を呼びます。返り値を整数で返します。
@raise NotImplementedError システムコールが現在のプラットフォームで提供されていない場合に発生します。 -
Process
:: Sys . # getgid -> Integer (3003.0) -
システムコールの getgid(2) を呼びます。返り値を整数で返します。
システムコールの getgid(2) を呼びます。返り値を整数で返します。
@raise NotImplementedError システムコールが現在のプラットフォームで提供されていない場合に発生します。 -
Process
:: Sys . # getuid -> Integer (3003.0) -
システムコールの getuid(2) を呼びます。返り値を整数で返します。
システムコールの getuid(2) を呼びます。返り値を整数で返します。
@raise NotImplementedError システムコールが現在のプラットフォームで提供されていない場合に発生します。