Kernel/LibC: Rework TIOC{G,S}WINSZ more linux like

Userspace can freely set terminal size, kernel just updates it when for
example new font is loaded. Also SIGWINCH is now sent by kernel instead
of userspace.
This commit is contained in:
2025-06-28 16:26:13 +03:00
parent 521457eb92
commit e8491b34b8
12 changed files with 62 additions and 77 deletions

View File

@@ -328,7 +328,7 @@ int main(int argc, char** argv)
tcsetattr(kb_fd, TCSANOW, &termios);
}
winsize ws { .ws_row = 0, .ws_col = 0 };
winsize ws {};
if (isatty(STDOUT_FILENO))
{
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) == 0)