diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-02 16:09:19 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-02 16:09:19 +0300 |
| commit | d08e44686d8b19bd9555cc99ec9068d9fde05f16 (patch) | |
| tree | ca2f34d2117efbf770095c437f9d6402c24d9fb3 /src/platform/unix_common.rs | |
| parent | 8633a398e653eee47b375c963996c78a8a14aa48 (diff) | |
fix(client): detach when terminal geometry is unavailable (#3531)
refs #3519
Diffstat (limited to 'src/platform/unix_common.rs')
| -rw-r--r-- | src/platform/unix_common.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/platform/unix_common.rs b/src/platform/unix_common.rs index ce5bba00..a7926c22 100644 --- a/src/platform/unix_common.rs +++ b/src/platform/unix_common.rs @@ -1,5 +1,9 @@ use std::path::{Path, PathBuf}; +pub(super) fn read_terminal_grid_size() -> std::io::Result<(u16, u16)> { + crossterm::terminal::window_size().map(|size| (size.columns, size.rows)) +} + fn set_sigpipe_disposition(handler: libc::sighandler_t) { let mut action: libc::sigaction = unsafe { std::mem::zeroed() }; action.sa_sigaction = handler; |
