in computer-use-demo/computer_use_demo/tools/bash.py [0:0]
def stop(self):
"""Terminate the bash shell."""
if not self._started:
raise ToolError("Session has not started.")
if self._process.returncode is not None:
return
self._process.terminate()