added functionality to interrupt the terminal when it is waiting for … Upstream-commit: 91853e44aeb20e55bcfcad5041c274783fdc06bc Component: engine