# pane.Pane.pid

- **Module:** pane.Pane
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/pane.rs#L212
- **Page:** https://libtmux.org/en/rs/latest/reference/pane-pane-pid/

```
pane.Pane.pid(self) -> Option<u32>
```

Return the process id of the pane's foreground process.

`None` for a pane with no process: tmux 3.8 reports `#{pane_pid}` as
an empty string once the pane's process has exited (`remain-on-exit`
keeps such a pane instead of closing it). A value is not evidence the
process is still alive, on any release: every release before 3.8
keeps reporting the exited process's own pid rather than clearing the
field, and a pid can be reused once its process is gone. Check
[`Self::is_dead`] for liveness; do not infer it from this.
