Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent accidentally killing first session if other sessions are open #774

Open
nitrocode opened this issue Feb 21, 2022 · 1 comment
Open

Comments

@nitrocode
Copy link
Member

nitrocode commented Feb 21, 2022

Have a question? Please checkout our Slack Community or visit our Slack Archive.

Slack Community

Describe the Feature

I often will run multiple terminal sessions of the same geodesic container. If I ran a terraform command such as terraform apply in sesson[1] and then ran exit in session[0], my session[1] would terminate and leave me with a half applied terraform state.

Use Case

N/A

Describe Ideal Solution

If multiple sessions are open, prompt the user when they try to exit session[0].

$ exit
Detected additional sessions open
* /bin/bash : terraform apply
* etc

Are you sure you want to exit [y/N] ? N

exit prevented
$ 

Alternatives Considered

N/A

Additional Context

N/A

@Nuru
Copy link
Sponsor Contributor

Nuru commented Apr 23, 2022

@nitrocode Do you have any suggestion as to how to implement this? You would have to trap/prevent exit, logout, and ctrl-D. I know you can set IGNOREEOF to give a warning on ctrl-D, but I don't know how you would run a custom hook for it.

@settings settings bot removed the feature request label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants