def _stop_proc(self):
if self._proc is None:<EOL><INDENT>return<EOL><DEDENT>if self._proc.returncode is None:<EOL><INDENT>try:<EOL><INDENT>self._send("<STR_LIT>")<EOL><DEDENT>except (SolverError, IOError) as e:<EOL><INDENT>logger.debug(str(e))<EOL><DEDENT>finally:<EOL><INDENT>try:<EOL><INDENT>self._proc.stdin.close()<EOL><DEDENT>except IOError as e:<EOL><INDENT>logger.debug(str(e))<EOL><DEDENT>try:<EOL><INDENT>self._proc.stdout.close()<EOL><DEDENT>except IOError as e:<EOL><INDENT>logger.debug(str(e))<EOL><DEDENT>self._proc.kill()<EOL>self._proc.wait()<EOL><DEDENT><DEDENT>self._proc: Popen = None<EOL>
Stops the z3 solver process by:
- sending an exit command to it,
- sending a SIGKILL signal,
- waiting till the process terminates (so we don't leave a zombie process)