mobile-shell / mobile-shell/mosh
Mosh shouldn't abort if closing an `fd` fails due to non-critical reasons
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 14.5k
- Forks
- 865
- PR merge metrics
- No merged PRs in 30d
Description
At https://github.com/mobile-shell/mosh/blob/master/src/network/network.cc#L605 there is fatal_assert() even when the error is ignorable (e.g. EIO, see https://man7.org/linux/man-pages/man2/close.2.html )
We should check errono and if the error is ignorable (e.g. I/O failed) mosh shouldn't abort. (We should also log the errono).
I am encountering this assert just 2 minutes after disconnecting from the network.
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
Inspect src/network/network.cc around line 605 and the close-related fatal_assert. Read the close(2) behavior for errno values, then determine which failures should be logged without aborting. Done means an ignorable close failure records its errno and mosh continues instead of aborting; verify the relevant behavior with the available project tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100