Skip to content

Remote shell should not terminate the remote node on EOF #9912

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

frazze-jobb
Copy link
Contributor

Closes #9852

@frazze-jobb frazze-jobb self-assigned this Jun 5, 2025
@frazze-jobb frazze-jobb added team:VM Assigned to OTP team VM fix labels Jun 5, 2025
@frazze-jobb frazze-jobb requested a review from garazdawi June 5, 2025 13:59
State#state.tty),
{keep_state, State#state{ tty = NewTTYState, groups = Gr1 }}
%% If the readhandle has terminated, then we should quit
case State#state.read =:= eof of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this code to make sure the remote node is also terminated?

Can we add tests for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When state.read =:= eof is true, then we want the local node to terminate, because it's the local node's readhandle that received the EOF. The remote node should still be alive.
When state.read =:= eof is false, then the remote node has terminated. The local node should remove its "remote shell group".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remsh stoping the main vm when closing stdin.
2 participants