method

ppid

v1_8_7_72 - Show latest stable - Class: Process
ppid()
public

Returns the process id of the parent of this process. Always returns 0 on NT. Not available on all platforms.

   puts "I am #{Process.pid}"
   Process.fork { puts "Dad is #{Process.ppid}" }

produces:

   I am 27417
   Dad is 27417