Module: Process
- Extended by:
- Polyphony::TrapInterceptor
- Defined in:
- lib/polyphony/extensions/process.rb,
lib/polyphony/extensions/kernel.rb
Overview
Overrides for Process module
Defined Under Namespace
Modules: StatusExtensions Classes: Status
Class Method Summary collapse
-
.daemon(*args) ⇒ Integer
Starts a daemon with the given arguments.
-
.detach(pid) ⇒ Fiber
Detaches the given pid and returns a fiber waiting on it.
Methods included from Polyphony::TrapInterceptor
Class Method Details
.daemon(*args) ⇒ Integer
Starts a daemon with the given arguments.
101 102 103 104 |
# File 'lib/polyphony/extensions/process.rb', line 101 def daemon(*args) orig_daemon(*args) Polyphony.original_pid = Process.pid end |
.detach(pid) ⇒ Fiber
Detaches the given pid and returns a fiber waiting on it.
88 89 90 91 92 |
# File 'lib/polyphony/extensions/process.rb', line 88 def detach(pid) fiber = spin { ::Process::Status.from_status_array(Polyphony.backend_waitpid(pid)) } fiber.define_singleton_method(:pid) { pid } fiber end |