# cmdq_guard

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L825
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-cmdq_guard/

```c
void cmdq_guard(struct cmdq_item *item, const char *guard, int flags)
```

## Parameters

- `item` (`struct cmdq_item *`)
- `guard` (`const char *`)
- `flags` (`int`)

## Called by

- [`cmdq_fire_command`](/en/tmux/latest/reference/c-function-cmd-queue-c-cmdq_fire_command/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L619)
- [`control_error`](/en/tmux/latest/reference/c-function-control-c-control_error/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/control.c#L533)

## Calls

- [`control_write`](/en/tmux/latest/reference/c-function-control_write/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L832)

## Referenced declarations

- [`cmdq_item.client`](/en/tmux/latest/reference/c-struct-cmdq_item-client/) (attribute)
- [`CLIENT_CONTROL`](/en/tmux/latest/reference/c-define-tmux-h-client_control/) (constant)
- [`cmdq_item`](/en/tmux/latest/reference/c-struct-cmdq_item/) (struct)
- [`client.flags`](/en/tmux/latest/reference/c-struct-client-flags/) (attribute)
- [`cmdq_item.number`](/en/tmux/latest/reference/c-struct-cmdq_item-number/) (attribute)
- [`cmdq_item.time`](/en/tmux/latest/reference/c-struct-cmdq_item-time/) (attribute)
