module MiGA::Common::WithDaemon

def process_alive?(pid)

call +terminate+ otherwise.
Check if the process with PID +pid+ is still alive,
#
def process_alive?(pid)
  Process.kill(0, pid)
  true
rescue Errno::ESRCH, Errno::EPERM, Errno::ENOENT
  terminate
  false
end