Ruby 1.9.2 Reference Manual > All Libraries > Builtin Library > module Process > pid
pid -> Integer
カレントプロセスのプロセス ID を返します。変数 $$ の値と同じです。
[SEE_ALSO] getpid(2)