diff --git a/changelog.md b/changelog.md index daf79f20..b05af289 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,11 @@ Features * Always clean favorite queries on save and fetch. +Bugfixes +--------- +* Call `setsid()` to keep SSH tunnels from receiving Ctrl-C interrupts. + + Documentation --------- * Document double-return requirement after `/fs` in multi-line mode. diff --git a/mycli/ssh_tunnel.py b/mycli/ssh_tunnel.py index d22a8475..12a742cc 100644 --- a/mycli/ssh_tunnel.py +++ b/mycli/ssh_tunnel.py @@ -187,6 +187,7 @@ def _run(self) -> None: stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, + start_new_session=True, ) except OSError as exc: self._startup_error = exc