libtmux Reference MCP Search
On this page

server.Server.daemonIdentity

View as Markdown

Module
server
Declared in
Server
Package
@libtmux/libtmux
Source
packages/libtmux/src/server.ts
daemonIdentity ( ) Promise<DaemonIdentity>
methodasync [source]
methodasync [source]
daemonIdentity

Which daemon is answering on this socket right now.

A socket path names a place, not a process. kill-server followed by a restart puts a different daemon at the same path, and that daemon numbers its panes from %0 again — so a handle held across the restart names an object that no longer exists, at an id something else now has. Comparing this before and after is how a long-running caller can tell.

A reachable daemon reports its identity even when it has no sessions. An unreachable server rejects instead of returning an absent identity.

Examples

const before = await server.daemonIdentity();
const after = await server.daemonIdentity();
before.pid === after.pid;

0 declared, 0 inherited

Esc

Type to search.