Ruby 1.8.7 Reference Manual > All Libraries > Builtin Library > module Process > pid

module function Process.#pid

pid -> Integer

カレントプロセスのプロセス ID を返します。変数 $$ の値と同じです。

[SEE_ALSO] getpid(2)