def watch_process(pid, *flags, &callback)
      Watcher::Process.new(self, pid, flags, callback)
    end
def watch_process(pid, *flags, &callback)
      Watcher::Process.new(self, pid, flags, callback)
    end
Watches a process for changes.
 The `flags` parameter specifies which changes
 will fire events.

 The {Event#flags} field contains the changes that caused the event to be fired.
 {Event#data} and {Event#eof?} are unused.

 ## Flags

 `:exit`
 : The process has exited.

 `:fork`
 : The process has created a child process via `fork(2)` or similar.

 `:exec`
 : The process has executed a new process via `exec(2)` or similar.

 `:signal`
 : The process was sent a signal.
   This is only supported under Darwin/OS X.

 `:reap`
 : The process was reaped by the parent via `wait(2)` or similar.
   This is only supported under Darwin/OS X.

 `:track`
 : Follow the process across `fork(2)` calls.
   {Event#flags} for the parent process will contain `:fork`,
   while {Event#flags} for the child process will contain `:child`.
   If the system was unable to attach an event to the child process,
   {Event#flags} will contain `:trackerr`.
   This is not supported under Darwin/OS X.

 @param pid [Fixnum] The id of the process.
 @param flags [Array<Symbol>] Which events to watch for.
 @yield [event] A block that will be run when the process changes.
 @yieldparam event [Event] The Event object containing information
   about the event that occurred.
 @return [Watcher] The Watcher for this event.
 @raise [SystemCallError] If something goes wrong when registering the Watcher.