End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Process.pid
Process.pid → integer
process.c
View on GitHub ↗
static VALUE
proc_get_pid(VALUE _)
{
return get_pid();
}
Returns the process id of this process. Not available on all platforms.
Example
Process.pid #=> 27415