ppid

Process.ppid â fixnum
Class Public methods

Returns the process id of the parent of this process. Returns untrustworthy value on Win32/64. Not available on all platforms.

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

produces:

1
2
I am 27417
Dad is 27417
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.