ztmux 3.7.17

A Rust port of tmux — the full terminal multiplexer, server and client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// C `vendor/tmux/compat/getdtablecount.c:32`: `int getdtablecount(void)`
// Faithful compat shim. The new vendored imsg read path (msgbuf_read/ibuf_read)
// no longer does the fd-table headroom check the old imsg_read did, so this is
// currently unused but kept to mirror the compat layer.
#[expect(dead_code)]
pub fn getdtablecount() -> i32 {
    if let Ok(read_dir) = std::fs::read_dir("/proc/self/fd") {
        read_dir.count() as i32
    } else {
        0
    }
}