# tmux_operation:transfer/2

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_operation.erl#L130
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_operation-transfer-2/

```
transfer/2
-spec transfer(t(), pid()) -> ok | {error, map()}.
```

Transfer ownership to a live process on this Erlang node. The endpoint installs its new owner monitor before releasing the previous monitor and returns after the swap. The new process performs no handshake. Waiters and ownership remain separate; endpoint ownership does not change.

An `await_timeout` abandons the reply, not the queued ownership change. The
transfer may complete later. Use `status/1` to read the current owner before
relying on ownership; a timeout does not prove that the old owner remains.

## Parameters

- `Operation` (`t()`)
- `Owner` (`pid()`)

## Guides

Pages that discuss `transfer/2`.

- [Owned operations](/en/erlang/latest/guides/operations/)
