code: def check_running(self):
          '''
          Check if a pid file exists and if it is associated with
          a running process.
          '''
  
          if self.check_pidfile():
              pid = self.get_pidfile()
              if not salt.utils.platform.is_windows():
                  if self.check_pidfile() and self.is_daemonized(pid) and os.getppid() != pid:
                      return True
              else:
                  # We have no os.getppid() on Windows. Use salt.utils.win_functions.get_parent_pid
                  if self.check_pidfile() and self.is_daemonized(pid) and salt.utils.win_functions.get_parent_pid() != pid:
                      return True
          return Falsf check_running(self):
          '''
          Check if a pid file exists and if it is associated with
          a running process.
          '''
  
          if self.check_pidfile():
              pid = self.get_pidfile()
              if not salt.utils.platform.is_windows():
                  if self.check_pidfile() and self.is_daemonized(pid) and os.getppid() != pid:
                      return True
              else:
                  # We have no os.getppid() on Windows. Use salt.utils.win_functions.get_parent_pid
                  if self.check_pidfile() and self.is_daemonized(pid) and salt.utils.win_functions.get_parent_pid() != pid:
                      return True
          return False
docs: Check if a pid file exists and if it is associated with
          a running process.