Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Incredibly rough POC of a Process.spawn_private method
Essentially, we introduce the concept of a waitpid_private_handle, and a VM-wide table of child PIDs -> such handles. When spawning a process, it can optionally be bound to such a handle, in which case that handle/pid combo is inserted into a global table. Whenever Ruby waits on a child process, if there is an active handle for that pid, we "steal" the status and stash it against the handle. We pretend to the caller that there was no child process. If the handle is used to perform the wait, however, we return the (possibly previously-saved) status. Essentially, if you don't have the handle, you can't waitpid the child.
- Loading branch information