Class: Mutant::Isolation::Fork Private
- Inherits:
-
Mutant::Isolation
- Object
- Mutant::Isolation
- Mutant::Isolation::Fork
- Includes:
- Adamantium::Flat
- Defined in:
- lib/mutant/isolation/fork.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Isolation via the fork(2) systemcall.
Defined Under Namespace
Classes: Child, ChildError, ForkError, Parent
Constant Summary collapse
- ATTRIBUTES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
(anima.attribute_names + %i[block reader writer]).freeze
Instance Method Summary collapse
-
#call(&block) ⇒ Result
private
Call block in isolation.
Instance Method Details
#call(&block) ⇒ Result
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Call block in isolation
131 132 133 134 135 |
# File 'lib/mutant/isolation/fork.rb', line 131 def call(&block) io.pipe(binmode: true) do |(reader, writer)| Parent.call(to_h.merge(block: block, reader: reader, writer: writer)) end end |