-
Notifications
You must be signed in to change notification settings - Fork 377
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
Kill Yazi when closing a window without quitting yazi #1300
Comments
I can't reproduce this issue on my macOS and Linux VM screenshot-001757.mp4When I kill the terminal window using the process manager, Yazi exits as expected. I don't use a window manager myself, is this issue only reproducible when killing the window through a window manager (If so, what signal does the window manager send when killing the window?)? What happens if the window is killed using the process manager? What about normally closing the window instead of killing it? |
Thanks for your quick reply. To narrow it down I also tested this with hyprland. The bevahior is the same. (Current system is Artix/wayland.) Then I tested this on a different computer. OS is chimera linux/wayland, window manager niri. The problem did not occur here. So, it could be an Artix-related problem. But this would be strange because I installed river and hyprland with the package manager. Another strange thing is that this does not happen with nnn or the combination nnn/helix.
Main PC (Artix): Windows are closed with a key binding, the underlying river command is If I launch helix right from the shell (not from within yazi) and close the river window, helix is properly closed (or killed?). Does this help you? Anything I can test? If this is not yazi-related, please just close this issue ;-) |
What if you kill the window (process) through Task Manager, or close the window normally (by clicking the window's X button), instead of using the window manager? And is this limited to foot, or how do other terminal emulators behave? |
Same behavior with alacritty. Here's a screenshot. Windows don't have any closing buttons because the tested window managers are almost keyboard only driven. Yet,
Not quite sure. It's possible to kill river/hyprland altogether from e.g. Thanks again! |
Could you upload a |
Hope this helps. Yazi runs perfectly -- as long as I don't just close its river window. Unfortunately, I cannot simulate the problem. Something like this does not work. (I've never used perf before.)
EDIT: One more piece of information I didn't mention. I use the key binding for |
There's no debugging symbols in |
Yes, compiled yazi with
Yazi
Version: 0.2.5 (ed6ae00 2024-07-16)
Debug : true
OS : linux-x86_64 (unix) |
That's so weird, is |
This is what I used. Correct?
Really sorry for bothering you! THX! |
How about using an absolute path? Like this:
No problem, thanks so much for being patient and helping to reproduce this issue! |
OK. Pointing to I keep thinking about if this can be related to Artix. I've been -- super happily -- using yazi for almost a year, and I just noticed this on Artix ... But as mentioned; no other program is affected. |
Please run |
Here's a download link. |
It looks like only some Lua code was executed. Do you have any config files? Would you mind uploading them? What would happen if just use the default config ( |
I tested with the default config before opening this issue. (But I'll attach my configs. No flavors or plugins are used.)
It only spikes CPU when I close the window running yazi with my file manager, which also should close yazi. Then I always need to If yazi is closed using But with a tiling window manager, you actually just use |
Found a solution by chance: I changed the login shell to dash, and the issue disappeared completely. So, the initial issue might be related to bash/Artix/yazi?! If nobody else has this issue with bash, maybe this topic can be closed. |
I suspect this might be related to Yazi's signal system - possibly, Yazi isn't handling the signals correctly, or isn't receiving them at all when the window/shell is closed. I made a PR to reimplement the signal handling, but I'm not sure if it will actually fix the issue. Could you give it a try? #1307 |
Thanks so much for your efforts. I just compiled yazi from your PR, switched back to bash as the login shell, and it's working perfectly. I closed multiple yazi windows (and editor windows launched by yazi) using the WM, and all yazi processes were closed. (Unfortunately I can't tell you for sure whether your PR alone solved this issue or -- additionally -- the change away and back from Artix's default login shell.) Thank you! |
Glad to see some changes have taken place, though I'm not sure what caused the issue and if that PR really fixed it. Anyway, let's merge it and close this issue for now. I'll keep an eye out to see if anyone else encounters similar problems. If you find any other clues, feel free to reply to this issue or create a new one. |
Finally had the chance to go back to an Artix installation. I can now confirm, that your PR definitely solved this issue. Same problem with my old, pre-PR binary, but everything works perfectly with a freshly compiled binary or the package manager's 0.3 version. Thanks again! |
That's great! Thank you for letting me know this! |
I'm going to lock this issue because it has been closed for 30 days. ⏳ |
What system are you running Yazi on?
Linux Wayland
What terminal are you running Yazi in?
foot version: 1.17.2 +pgo +ime +graphemes -assertions
yazi --debug
outputDid you try the latest nightly build to see if the problem got fixed?
Yes, and I updated the debug information above (
yazi --debug
) to the nightly that I triedDescribe the bug
I use a tiling window manager (river).
When I open yazi within a window and then close the window, yazi is not killed.
btm
shows a very high CPU usage for yazi then.When I open my editor (helix) from yazi and then close the window, helix is not killed instead (but yazi is).
Expected Behavior
I would expect yazi and any program opened from within yazi to be killed when closing a window.
To Reproduce
1
yazi
was not killed.2
helix
was not killed.Configuration
None/default
Anything else?
Although a window manager, a shell, yazi (and an editor) are involved, this seems to be yazi related:
If the steps listed above are reproduced with nnn, everything works as expected, i.e. nnn (or helix) is killed when a containing window is closed.
The text was updated successfully, but these errors were encountered: