Server.daemonIdentity
Which daemon is answering on this socket right now.
Source and package
- Qualified name
-
Server.daemon Identity - Module
- server
- Declared in
Server- Package
- libtmux
- Source
- packages/libtmux/src/server.ts
- async daemonIdentity( options: Snapshot
Options = {}, ): Promise<DaemonIdentity > -
Description#
A socket path names a place, not a process.
kill-serverfollowed by a restart puts a different daemon at the same path, and that daemon numbers its panes from%0again — 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;- Parameters
-
-
options={}(SnapshotOptions ) #
-