Project

General

Profile

Actions

Feature #17369

closed

Introduce non-blocking `Process.wait`, `Kernel.system` and related methods.

Added by ioquatix (Samuel Williams) almost 4 years ago. Updated about 3 years ago.

Status:
Closed
Target version:
-
[ruby-core:101250]

Description

https://github.com/ruby/ruby/pull/3853

This PR introduces optional hooks to the scheduler interface for handling Process.wait, Kernel.system and other related methods (waitpid, wait2, etc).

It funnels all methods through a new interface Process::Status.wait which is almost identical to Process.wait except for several key differences:

  • The return value is a single instance of Process::Status.
  • It does not set thread local $?.

This is necessary for keeping the scheduler interface simple (and side effects are generally bad anyway).

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0