EventMachine::ProcessWatch

This is subclassed from EventMachine::Connection for use with the process monitoring API. Read the documentation on the instance methods of this class, and for a full explanation see EventMachine.watch_process.

Public Instance Methods

pid() click to toggle source

Returns the pid that EventMachine::watch_process was originally called with.

    # File lib/em/process_watch.rb, line 21
21:     def pid
22:       @pid
23:     end
process_exited() click to toggle source

Should be redefined with the user’s custom callback that will be fired when the process exits.

stop_watching is called automatically after this callback

    # File lib/em/process_watch.rb, line 34
34:     def process_exited
35:     end
process_forked() click to toggle source

Should be redefined with the user’s custom callback that will be fired when the prcess is forked.

There is currently not an easy way to get the pid of the forked child.

    # File lib/em/process_watch.rb, line 28
28:     def process_forked
29:     end
stop_watching() click to toggle source

Discontinue monitoring of the process. This will be called automatically when a process dies. User code may call it as well.

    # File lib/em/process_watch.rb, line 39
39:     def stop_watching
40:       EventMachine::unwatch_pid(@signature)
41:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.