# session_next

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L400
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-session_next/

```c
int session_next(struct session *s, int alert)
```

## Parameters

- `s` (`struct session *`)
- `alert` (`int`)

## Called by

- [`cmd_select_window_exec`](/en/tmux/latest/reference/c-function-cmd-select-window-c-cmd_select_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-select-window.c#L108)
- [`session_detach`](/en/tmux/latest/reference/c-function-session_detach/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L346)
- [`session_group_synchronize1`](/en/tmux/latest/reference/c-function-session-c-session_group_synchronize1/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L649)

## Calls

- [`session_next_alert`](/en/tmux/latest/reference/c-function-session-c-session_next_alert/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L409)
- [`session_set_current`](/en/tmux/latest/reference/c-function-session_set_current/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L415)
- [`winlink_next`](/en/tmux/latest/reference/c-function-winlink_next/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L407)

## Referenced declarations

- [`session.curw`](/en/tmux/latest/reference/c-struct-session-curw/) (attribute)
- [`session`](/en/tmux/latest/reference/c-struct-session/) (struct)
- [`session.windows`](/en/tmux/latest/reference/c-struct-session-windows/) (attribute)
