code: def request_stop(self, message='', exit_code=0):
          
          # Log an error message if exit code is not 0
          # Force output to stderr
          if exit_code:
              if message:
                  logger.error(message)
                  try:
                      sys.stderr.write(message)
                  except Exception:  # pylint: disable=broad-except
                      pass
              logger.error("Sorry, I bail out, exit code: %d", exit_code)
              try:
                  sys.stderr.write("Sorry, I bail out, exit code: %d" % exit_code)
              except Exception:  # pylint: disable=broad-except
                  pass
          else:
              if message:
                  logger.info(message)
  
          self.unlink()
          self.do_stop()
  
          logger.info("Stopped %s.", self.name)
          sys.exit(exit_code)
docs: Remove pid and stop daemon
  
          :return: None