Skip to content

Conversation

@NoobZang
Copy link
Contributor

Setting O_NONBLOCK via fcntl is not sufficient for TTYs in non-canonical mode. A subsequent tcsetattr call would override this, as the default VMIN and VTIME settings cause the driver to block.

Explicitly set VMIN and VTIME to ensure a true non-blocking read.

Fixes #26166.

Setting O_NONBLOCK via fcntl is not sufficient for TTYs in
non-canonical mode. A subsequent tcsetattr call would override this,
as the default VMIN and VTIME settings cause the driver to block.

Explicitly set VMIN and VTIME to ensure a true non-blocking read.

Fixes SerenityOS#26166.
@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Nov 25, 2025
@nico
Copy link
Contributor

nico commented Nov 25, 2025

Do you know what caused the regression?

@NoobZang
Copy link
Contributor Author

I hadn't dug into the history. Top code seems good. I guess a deeper change of IO/TTY/fcntl/tcsetattr caused the regression. Explicitly setting VMIN and VTIME makes top more robust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👀 pr-needs-review PR needs review from a maintainer or community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

top: No longer updates again

2 participants