def METHOD_NAME(self):
    if self._process:
        self._process.terminate()
        self._process = None
    if self._logfile:
        self._logfile.close()
        self._logfile = None
    return True