console-rs / console-rs/console
SIGWINCH generates SIGINT
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 144
- Avg merge
- 8h 24m
- Merged PRs (30d)
- 4
Description
If we look at the code located here https://github.com/console-rs/console/blob/master/src/unix_term.rs#L325
you should realize that EINTR can be generated also by other signals than SIGINT.
In my application, if I resize the terminal, a SIGWINCH signal is thrown, but your crate translates that SIGWINCH (which generates an EINTR) to a SIGINT, so you're throwing an unwanted SIGINT to the "outselves", causing my application to brutally exit (since it received a SIGINT).
PLEASE FIX THIS!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/unix_term.rs around line 325 and trace how EINTR is handled when terminal signals occur. Reproduce the SIGWINCH case and verify that resizing the terminal no longer produces SIGINT, while the existing SIGINT behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100