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: respond to the SIGTERM signal even when Yazi is in the background and has passed control of the terminal to the spawned process #797

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

sxyazi
Copy link
Owner

@sxyazi sxyazi commented Mar 10, 2024

Fixes #796

@musjj
Copy link
Contributor

musjj commented Mar 10, 2024

Thanks for the quick PR! But it looks like that this causes the spawned process to linger after yazi terminates. Some other issues:

After terminating yazi, it kind of messes up my shell in a weird way. In the case of helix, the CPU usage of the lingering process spikes up really badly.

It also causes ^C to not function correctly in the shell, even after the child process is terminated (it normally should create a new empty prompt line).

Maybe a video would be helpful:

yazi_fixed.mp4

But on the other hand, this DOES fix the shutdown problem. For me personally, the only time yazi would be receiving SIGTERM is when my system is shutting down, so I don't really mind it tbh.

…und and has passed control of the terminal to the spawned process
@sxyazi
Copy link
Owner Author

sxyazi commented Mar 13, 2024

Thank you for the test. I will create a new PR later to address this issue, which is also related to #726. Let's merge this first.

@sxyazi sxyazi merged commit 094d44e into main Mar 13, 2024
5 checks passed
@sxyazi sxyazi deleted the pr-3e8d45ba branch March 13, 2024 15:26
@sxyazi
Copy link
Owner Author

sxyazi commented Mar 13, 2024

Hi, I made a new PR, please try #812

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yazi does not respond to SIGTERM when running a subprocess
2 participants