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

fix(os): attempt to stop children with SIGTERM before SIGKILL #601

Merged
merged 2 commits into from
Jul 5, 2021

Conversation

imsnif
Copy link
Member

@imsnif imsnif commented Jul 5, 2021

This is a fix for #597 (and likely some other issues).

Previously we sent a SIGKILL to a child process whenever we wanted to kill it (eg. closing a pane).
Not only is this overkill (pun intended) but in some cases the children get stuck (likely if they have some critical cleanup to do that we're not giving them a chance to).

Now we make 3 attempts to send a SIGTERM, and then send a SIGKILL. This has a super minor performance implication when closing Zellij with several dozen panes open, but it's (at least on my machine) a question of +1-2 seconds, and it's just on exit in this edge case. So I think it's bearable.

@imsnif imsnif merged commit 4720686 into main Jul 5, 2021
@har7an har7an deleted the properly-close-child branch October 23, 2022 15:05
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

Successfully merging this pull request may close these issues.

1 participant