code: def poll(self):
          
          self._returncode = self.process.poll()
  
          if self._returncode is not None:
              self.set_status(self.S_DONE, "status set to Done")
  
          return self._returncode
docs: Check if child process has terminated. Set and return returncode attribute.