Can't close interactive bash session
^C doesn't close interactive session
$ cat Supfile
---
version: 0.4
networks:
production:
hosts:
- [email protected]:9022
- [email protected]:9022
commands:
bash:
desc: Interactive Bash on all hosts
stdin: true
run: bash
$ sup production bash
id
[email protected]:9022 | [bborysenko@rz-ca2 ~]$ uid=2028(bborysenko) gid=2028(bborysenko) groups=2028(bborysenko),10(wheel),2300(sysadmin)
[email protected]:9022 | [bborysenko@rz-ca1 ~]$ uid=2028(bborysenko) gid=2028(bborysenko) groups=2028(bborysenko),10(wheel),2300(sysadmin)
^[email protected]:9022 | [bborysenko@rz-ca2 ~]$ ^C
[email protected]:9022 | [bborysenko@rz-ca1 ~]$ ^C
exit works and ^C should work too. The remote shell must ignore the INT signal or something. Can you send me name/version of your remote shell?
sup production bash <<< 'bash --version'
[email protected]:9022 | [bborysenko@rz-ca2 ~]$ GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu)
[email protected]:9022 | [bborysenko@rz-ca1 ~]$ GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu)
I'm not 100% convinced what to do in this case.
If you run bash inside of bash, the same thing happens.. ^C doesn't exit the process. However, ^D (closing stdin) or typing exit does.
I guess I should solve the ^D first, which doesn't seem to work properly... and then reconsider if multiple ^C should force-exit the remote process even if it traps SIGINT.
FWIW I also can't seem to close multiple interactive bash sessions via ^C (or ^D for that matter). Though exit does work. This is with standard bash (afaik) on CoreOS Container Linux distro:
GNU bash, version 4.3.48(1)-release (x86_64-cros-linux-gnu)
Not a big deal however–may poke at the issue a bit myself. Btw, really wish I had discovered sup sooner, it's making life as an SRE much nicer :)
Bump. Same - can't close the session. And yes sup is an amazing product, I should be using it now used of ansible and fabric.