Module: Zookeeper::Forked
- Included in:
- CZookeeper, ZookeeperBase
- Defined in:
- lib/zookeeper/forked.rb
Instance Method Summary collapse
-
#forked? ⇒ true, false
the includer provides an ‘original_pid’ method, which is set when the original ‘owning’ process creates the object.
-
#update_pid! ⇒ Object
sets the ‘original_pid` to the current value.
Instance Method Details
#forked? ⇒ true, false
the includer provides an ‘original_pid’ method, which is set when the original ‘owning’ process creates the object.
9 10 11 |
# File 'lib/zookeeper/forked.rb', line 9 def forked? Process.pid != original_pid end |
#update_pid! ⇒ Object
sets the ‘original_pid` to the current value
14 15 16 |
# File 'lib/zookeeper/forked.rb', line 14 def update_pid! self.original_pid = Process.pid end |