class EventMachine::ProcessWatch

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

def pid

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

def process_exited

stop_watching is called automatically after this callback

Should be redefined with the user's custom callback that will be fired when the process exits.
def process_exited
end

def process_forked

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

Should be redefined with the user's custom callback that will be fired when the prcess is forked.
def process_forked
end

def receive_data(data)

Other tags:
    Private: -
def receive_data(data)
  case data
  when Cfork
    process_forked
  when Cexit
    process_exited
  end
end

def stop_watching

This will be called automatically when a process dies. User code may call it as well.
Discontinue monitoring of the process.
def stop_watching
  EventMachine::unwatch_pid(@signature)
end