server.Server.owns_control_client
Rust
- Python Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- server
- Declared in
- Server
- Package
- libtmux
- Source
- crates/libtmux/src/server.rs
-
Report whether this process itself opened the control client with this pid, and it is still running.
crate::Client::is_ownis the usual form, and reads better: ask a handle fromSelf::clientsrather than doing pid arithmetic. This one is for a caller that already has a pid and no handle -- readinglist-clientsitself to get sessions and pids in one command, which a per-client lookup would turn into one command each.crate::Pane::stream_output,crate::Client::pidand friends can all open or report a control-mode connection; tmux counts any of them as an attached client the same as a human's terminal. A caller telling its own observation apart from an attached human reads everycrate::Client::pidit cares about through this rather than tracking one connection it happened to keep, because more than one may be open at once.Examples
let guard = libtmux::test::TestServer::new().await?;let server = guard.server();// Nothing has opened a control client yet.assert!(!server.owns_control_client(std::process::id()));guard.shutdown().await?;
0 declared, 0 inherited