Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Process::Status#pid
pid → integer
process.c
View on GitHub ↗
static VALUE
pst_pid_m(VALUE self)
{
rb_pid_t pid = pst_pid(self);
return PIDT2NUM(pid);
}
Returns the process ID of the process:
Example
system("false") $?.pid # => 1247002