code: def is_running(self):
          
          try:
              kill(int(self.pid.get()), 0)
              return True
          
          # Process not running, remove PID/lock file if it exists
          except:
              self.pid.remove()
              self.lock.remove()
              return False
docs: Check if the service is running.