# tmux_identity

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_identity.erl#L1
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_identity/

Observe a Linux process incarnation using its PID, boot ID and start ticks.

A successful check is an observation. It neither reserves a PID nor pins a
tmux connection, and it never authorizes signalling a process. Endpoint owners
in `m:tmux_server` compare the PID returned by the current connection as well.
A server can still change between this check and a later one-shot command.

Use `fingerprint/1` to compare captured incarnations across endpoint handles
or persist that comparison in a plan. It performs no process observation;
the key grants neither liveness nor permission to act.

## Examples

```erlang
1> Pid = list_to_integer(os:getpid()), ok.
ok
2> {ok, Identity} = tmux_identity:observe(Pid), ok.
ok
3> tmux_identity:check(Identity, Pid).
ok
```

## Members

### Common operations

- [`fingerprint/1`](/en/erlang/latest/reference/tmux_identity-fingerprint-1/) (function): Derive a portable `t:fingerprint/0` from a captured identity without I/O.

### Other members

- [`check/2`](/en/erlang/latest/reference/tmux_identity-check-2/) (function): Re-observe the PID and compare its incarnation token. A successful result is a momentary observation, not ownership, permission to signal, or a same-connection guarantee.
- [`fingerprint/0`](/en/erlang/latest/reference/t-tmux_identity-fingerprint-0/) (typealias): Versioned SHA-256 comparison key for a captured Linux process incarnation. The linux-v1 prefix identifies the canonical encoding, independent of Erlang term serialization. Keys compare identity observations, not endpoint ownership or current liveness. They are identifiers, not authentication tokens.
- [`observe/1`](/en/erlang/latest/reference/tmux_identity-observe-1/) (function): Observe a Linux PID incarnation without signalling it. Returns a tagged error if the process cannot be identified; this performs local operating-system I/O.
- [`t/0`](/en/erlang/latest/reference/t-tmux_identity-t-0/) (typealias): Observed Linux PID, boot identity and process-start token. It does not pin a connection.

## Guides

Pages that discuss `tmux_identity`.

- [Native API documentation](/en/erlang/latest/guides/api-documentation/)
