pressly / sup

Super simple deployment tool - think of it like 'make' for a network of servers
https://pressly.github.io/sup
MIT License
2.48k stars 178 forks source link

Can't close interactive bash session #90

Open bborysenko opened 8 years ago

bborysenko commented 8 years ago

^C doesn't close interactive session

$ cat Supfile

---
version: 0.4

networks:
  production:
    hosts:
      - bborysenko@172.30.30.70:9022
      - bborysenko@172.30.30.71:9022

commands:
  bash:
    desc: Interactive Bash on all hosts
    stdin: true
    run: bash

$ sup production bash
id
bborysenko@172.30.30.71:9022 | [bborysenko@rz-ca2 ~]$ uid=2028(bborysenko) gid=2028(bborysenko) groups=2028(bborysenko),10(wheel),2300(sysadmin)
bborysenko@172.30.30.70:9022 | [bborysenko@rz-ca1 ~]$ uid=2028(bborysenko) gid=2028(bborysenko) groups=2028(bborysenko),10(wheel),2300(sysadmin)
^Cbborysenko@172.30.30.71:9022 | [bborysenko@rz-ca2 ~]$ ^C
bborysenko@172.30.30.70:9022 | [bborysenko@rz-ca1 ~]$ ^C
VojtechVitek commented 8 years ago

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?

bborysenko commented 8 years ago
sup production bash <<< 'bash --version'
bborysenko@172.30.30.71:9022 | [bborysenko@rz-ca2 ~]$ GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu)
bborysenko@172.30.30.70:9022 | [bborysenko@rz-ca1 ~]$ GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu)
VojtechVitek commented 8 years ago

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.

PaulCapestany commented 6 years ago

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 :)

AlexMikhalev commented 4 years ago

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.