-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
ncspot does not close when terminal is closed #1309
Labels
bug
Something isn't working
Comments
hrkfdn
added a commit
that referenced
this issue
Oct 11, 2023
While this probably reintroduces the crashes it should handle `SIGHUP` again which currently leads into the `unreachable!()` branch. Fixes #1309
Closed
Hey, thanks for the report. Can you let me know if it changes with the changes in #1310? |
Duplicate of #1282 - it shouldn't stay open anymore but will cause a panic! when closing. |
dricottone
added a commit
to dricottone/ncspot
that referenced
this issue
Jan 10, 2024
Commit a067ab2: feat: move to async POSIX signal handler Instead of trying to handle signals for every step of the `cursive` event loop, move the signal handling into its own asynchronous task and send callbacks to `cursive` when a signal arrives. PR 1305: fix: restore SIGHUP in signal handler Restore the SIGHUP signal handler which was accidentally removed in a067ab2. The commit had to be reverted and the PR was closed. Commit a1a9863: Revert "feat: move to async POSIX signal handler" ThomasFrans commented: From what I can see, it's an issue introduced by the crossterm backend. The ncurses one doesn't keep the process running. Currently I suspect Cursive is doing a write to /dev/tty which is closed, and that write blocks on the crossterm backend and returns immediately on the ncurses backend. I guess it could be resolved by switching the default backend (again)? This would solve hrkfdn#1309 and hrkfdn#1310 and hrkfdn#1282. I'd love to hear thoughts on this idea. If it's an OK solution, I'd try to see whether I can open an issue at Cursive or Crossterm to resolve the issue there, and meanwhile switch backend and add the SIGHUP handler back to finally close all these issues A commit to deprecate the crossterm/pancurses/termion backends will follow.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The last commit a067ab2 seems to break the way ncspot handles a SIGTERM. If I close the terminal ncspot continues to run and I have to kill it. Reverting this commit fixes this issue.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
ncspot should close as well, when the terminal is closed.
System (please complete the following information):
The text was updated successfully, but these errors were encountered: