# server_destroy_pane

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L308
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-server_destroy_pane/

```c
void server_destroy_pane(struct window_pane *wp, int notify)
```

## Parameters

- `wp` (`struct window_pane *`)
- `notify` (`int`)

## Called by

- [`cmd_pipe_pane_error_callback`](/en/tmux/3.2a/reference/c-function-cmd-pipe-pane-c-cmd_pipe_pane_error_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-pipe-pane.c#L223)
- [`cmd_pipe_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-pipe-pane-c-cmd_pipe_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-pipe-pane.c#L78)
- [`cmd_pipe_pane_read_callback`](/en/tmux/3.2a/reference/c-function-cmd-pipe-pane-c-cmd_pipe_pane_read_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-pipe-pane.c#L196)
- [`cmd_pipe_pane_write_callback`](/en/tmux/3.2a/reference/c-function-cmd-pipe-pane-c-cmd_pipe_pane_write_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-pipe-pane.c#L207)
- [`server_child_exited`](/en/tmux/3.2a/reference/c-function-server-c-server_child_exited/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server.c#L482)
- [`window_pane_error_callback`](/en/tmux/3.2a/reference/c-function-window-c-window_pane_error_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L971)

## Calls

- [`layout_close_pane`](/en/tmux/3.2a/reference/c-function-layout_close_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L377)
- [`notify_pane`](/en/tmux/3.2a/reference/c-function-notify_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L343)
- [`options_get_number`](/en/tmux/3.2a/reference/c-function-options_get_number/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L327)
- [`screen_write_linefeed`](/en/tmux/3.2a/reference/c-function-screen_write_linefeed/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L348)
- [`screen_write_nputs`](/en/tmux/3.2a/reference/c-function-screen_write_nputs/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L356)
- [`screen_write_start_pane`](/en/tmux/3.2a/reference/c-function-screen_write_start_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L345)
- [`screen_write_stop`](/en/tmux/3.2a/reference/c-function-screen_write_stop/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L367)
- [`server_client_remove_pane`](/en/tmux/3.2a/reference/c-function-server_client_remove_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L376)
- [`server_kill_window`](/en/tmux/3.2a/reference/c-function-server_kill_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L381)
- [`server_redraw_window`](/en/tmux/3.2a/reference/c-function-server_redraw_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L383)
- [`server_unzoom_window`](/en/tmux/3.2a/reference/c-function-server_unzoom_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L375)
- [`window_remove_pane`](/en/tmux/3.2a/reference/c-function-window_remove_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L378)

## Other function references

- [`screen_write_cursormove`](/en/tmux/3.2a/reference/c-function-screen_write_cursormove/) (function)
- [`screen_write_scrollregion`](/en/tmux/3.2a/reference/c-function-screen_write_scrollregion/) (function)
- [`sig2name`](/en/tmux/3.2a/reference/c-function-sig2name/) (function)

## Referenced by

- [`server_client_push_stderr`](/en/tmux/3.2a/reference/c-function-server_client_push_stderr/) (function)

## Referenced declarations

- [`window_pane.base`](/en/tmux/3.2a/reference/c-struct-window_pane-base/) (attribute)
- [`window_pane.event`](/en/tmux/3.2a/reference/c-struct-window_pane-event/) (attribute)
- [`window_pane.fd`](/en/tmux/3.2a/reference/c-struct-window_pane-fd/) (attribute)
- [`window_pane.flags`](/en/tmux/3.2a/reference/c-struct-window_pane-flags/) (attribute)
- [`grid_default_cell`](/en/tmux/3.2a/reference/c-variable-grid_default_cell/) (attribute)
- [`window_pane.options`](/en/tmux/3.2a/reference/c-struct-window_pane-options/) (attribute)
- [`PANE_REDRAW`](/en/tmux/3.2a/reference/c-define-tmux-h-pane_redraw/) (constant)
- [`PANE_STATUSDRAWN`](/en/tmux/3.2a/reference/c-define-tmux-h-pane_statusdrawn/) (constant)
- [`PANE_STATUSREADY`](/en/tmux/3.2a/reference/c-define-tmux-h-pane_statusready/) (constant)
- [`window.panes`](/en/tmux/3.2a/reference/c-struct-window-panes/) (attribute)
- [`screen_write_ctx.s`](/en/tmux/3.2a/reference/c-struct-screen_write_ctx-s/) (attribute)
- [`screen_size_y`](/en/tmux/3.2a/reference/c-define-tmux-h-screen_size_y/) (constant)
- [`window_pane.status`](/en/tmux/3.2a/reference/c-struct-window_pane-status/) (attribute)
- [`window_pane.window`](/en/tmux/3.2a/reference/c-struct-window_pane-window/) (attribute)
- [`window_pane`](/en/tmux/3.2a/reference/c-struct-window_pane/) (struct)
