# libtmux::Pane::exit_status

- **Module:** libtmux::Pane
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/393d4b0ad666f18a6581f1eb281741a75a7503f0/include/libtmux/entities.hpp#L727
- **Page:** https://libtmux.org/en/cxx/latest/reference/libtmux-pane-exit_status-zax2/

```
libtmux::Pane::exit_status() -> std::optional< int >
```

What the pane's process exited with, once it has.

Optional rather than a number because zero is a real exit status and "still running" is not a status at all — tmux renders the field empty until the process is gone. Only a pane held on screen by `remain-on-exit` can report one: without it tmux destroys the pane, and there is nothing left to ask.
