# LibTmux.Program.resumeProgramCleanup

- **Package:** libtmux-haskell
- **Language:** Haskell
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-haskell/blob/72edb54317bf619c6dc54bff311844f062f8984c/internal/LibTmux/Internal/Program.hs#L211
- **Page:** https://libtmux.org/en/haskell/latest/reference/libtmux-program-v-resumeprogramcleanup/

```haskell
resumeProgramCleanup :: ProgramRecovery -> IO ()
```

Signature types: [`ProgramRecovery`](/en/haskell/latest/reference/libtmux-program-t-programrecovery/), [`IO`](https://hackage.haskell.org/package/base-4.22.0.0/docs/Prelude.html#t:IO).

Retry cleanup through its retained pin, including after the borrowing
 Server scope ends. Application launch and input are never repeated.

## Referenced declarations

- [`LibTmux.Program.ProgramRecovery`](/en/haskell/latest/reference/libtmux-program-t-programrecovery/) (data type)

## tmux command

The tmux commands behind `resumeProgramCleanup`.

- [`delete-buffer`](/en/tmux/latest/manual/delete-buffer/) (when a captured buffer remains owned)
- [`kill-session`](/en/tmux/latest/manual/kill-session/) (when the owned session still exists)
- [`display-message`](/en/tmux/latest/manual/display-message/) (when startup left the process identity unobserved)
- [`has-session`](/en/tmux/latest/manual/has-session/) (when an owned creation receipt was retained)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_delete_buffer_entry`](/en/tmux/latest/reference/c-variable-cmd_delete_buffer_entry/) (attribute)
- [`cmd_set_buffer_exec`](/en/tmux/latest/reference/c-function-cmd-set-buffer-c-cmd_set_buffer_exec/) (function)
- [`cmd_kill_session_entry`](/en/tmux/latest/reference/c-variable-cmd_kill_session_entry/) (attribute)
- [`cmd_kill_session_exec`](/en/tmux/latest/reference/c-function-cmd-kill-session-c-cmd_kill_session_exec/) (function)
- [`cmd_display_message_entry`](/en/tmux/latest/reference/c-variable-cmd_display_message_entry/) (attribute)
- [`cmd_display_message_exec`](/en/tmux/latest/reference/c-function-cmd-display-message-c-cmd_display_message_exec/) (function)
- [`cmd_has_session_entry`](/en/tmux/latest/reference/c-variable-cmd_has_session_entry/) (attribute)
- [`cmd_new_session_exec`](/en/tmux/latest/reference/c-function-cmd-new-session-c-cmd_new_session_exec/) (function)

Each path starts at a function a command runs, which is degree 1. The degree counts steps from there along the path, and each step is a call or a reference: degree 2 is reached from that function, degree 3 from the next, and so on.

### Create a session and its first pane

1. [`cmd_new_session_exec`](/en/tmux/latest/reference/c-function-cmd-new-session-c-cmd_new_session_exec/) (function)
2. calls → [`spawn_window`](/en/tmux/latest/reference/c-function-spawn_window/) (function)
3. calls → [`spawn_pane`](/en/tmux/latest/reference/c-function-spawn_pane/) (function)
4. calls → [`window_add_pane`](/en/tmux/latest/reference/c-function-window_add_pane/) (function)
5. calls → [`window_pane_create`](/en/tmux/latest/reference/c-function-window-c-window_pane_create/) (function)

## Guides

Pages that discuss `resumeProgramCleanup`.

- [Run terminal applications](/en/haskell/latest/guides/programs/)
