def terminate(self):
if not self.is_terminated:<EOL><INDENT>log.debug("<STR_LIT>")<EOL>try:<EOL><INDENT>self.exec_command(b"<STR_LIT>")<EOL><DEDENT>except BrokenPipeError:  <EOL><INDENT>pass<EOL><DEDENT>except socket.error as e:<EOL><INDENT>if e.errno != errno.ECONNRESET:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>self.app.close()<EOL>self.is_terminated = True<EOL><DEDENT>
terminates the underlying x3270 subprocess. Once called, this
Emulator instance must no longer be used.