tmux_pane:wait_exit/2
Wait for a retained pane's process. Return its native status or signal (exit/0) and a fresh pane row. Set remain-on-exit to on before starting a job whose exit you need. A live pane with another setting returns remain_on_exit_required.
Source and package
- Qualified name
-
tmux_pane: wait _exit/2 - Declared in
tmux_pane- Package
- libtmux_erlang
- Source
- apps/libtmux_erlang/src/tmux_pane.erl
- wait_exit(Pane, Options) -spec wait_exit(tmux
_model: (), waitpane _exit ()) -> {ok, wait_options _exit ()} | {error, map()}._result -
Description
A live wait binds the process and pins its PTY allocation. The owner holds that pin through the final read without consuming terminal bytes. Respawn returns
stale_paneand replacement of the daemon returnsstale_server. An exit already published at the first read is a current observation. The fast path has no live-generation pin.On tmux 3.8, the wait uses a filtered native
pane-diedevent. On older supported daemons, it registers a private indexed hook and channel. Both paths recheck native state before acting on an exit notification. Keep the endpoint open through cleanup. The supervised owner retires the wait client when the call ends or its caller dies. A native unset failure can leave a legacy hook installed.deadline_msbounds the native wait, starting after the initial observation. Setup readiness and cleanup waits each have a 900 ms limit. State probes and final capture each use their own 2,500 ms command budget. Client retirement can add its cleanup allowance.-
deadlinemeans the wait reached its bound. A still-running pane can be waited on again. -
exit_status_unavailablemeans the original process exited and tmux has yet to publish a native status or signal. -
pane_generation_unavailablemeans the wait could not bind its original process and terminal. -
target_gonemeans the pane disappeared.
See pane-exit errors for remedies. To capture a job's final screen, use the job guide pattern that acknowledges terminal parsing before exit.
Invalid options fail before I/O.
- Parameters
-
-
Pane(tmux_model: ())pane
-
-
Recorded calls
source callsThe Erlang reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls tmux_pane:wait_exit/2.
tmux command
task materialThe tmux commands behind wait_exit/2.
tmux C API
task materialThe C declarations in tmux that implement these commands.
Guides
task materialPages that discuss wait_exit/2.