code: def isprocess(pid, error=False):
      
      try:
          # Don't worry folks, no processes are harmed in the making of
          # this system call:
          os.kill(pid, 0)
          return True
      except OSError:
          return False
docs: Check that a process is running.
  
      Arguments:
  
          pid (int): Process ID to check.
  
      Returns:
  
          True if the process is running, else false.