code: def _process_commands(self):
          
  
          try:
              # poll for data, so we don't block forever
              if self._cmd_pipe.poll(1):  # 1 sec timeout
                  payload = self._cmd_pipe.recv_bytes()
  
                  if payload:
                      # segment payload
                      parts = payload.split('\x80', 2)
                      _op = parts[0]
  
                      # terminate operation
                      if _op == 'TRM':
                          raise EOFError
  
                      # shell command operation
                      elif _op == 'SHL' and len(parts) == 2:
                          command = parts[1]
  
                          if command:
                              # run command and return success or fail
                              res = common.shell_process(command)
  
                              if res is not None:
                                  self._cmd_pipe.send_bytes('OK')
                                  return True
  
                      # everything else, should reply with "FAIL"
                      self._cmd_pipe.send_bytes('FAIL')
  
          except (EOFError, IOError):
              return False
  
          else:
              return True
docs: Processes commands received and executes them accordingly.
              Returns ``True`` if successful, ``False`` if connection closed or
              server terminated.