---
name: "ioctl_pipe"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ioctl_pipe"
---

# ioctl\_pipe(2)

ioctl() operations for general notification mechanism

## NAME

ioctl\_pipe - ioctl() operations for general notification mechanism

## SYNOPSIS

```
#include <linux/watch_queue.h>  /* Definition of IOC_WATCH_QUEUE_* */
#include <sys/ioctl.h>
```

**int ioctl(int** *pipefd***, IOC\_WATCH\_QUEUE\_SET\_SIZE, int** *size***);** **int ioctl(int** *pipefd***, IOC\_WATCH\_QUEUE\_SET\_FILTER,**           **struct watch\_notification\_filter \****filter***);**

## DESCRIPTION

The following [**ioctl**(2)](/ioctl/2.md) operations are provided to set up general notification queue parameters. The notification queue is built on the top of a [**pipe**(2)](/pipe/2.md) opened with the **O\_NOTIFICATION\_PIPE** flag.

- **IOC\_WATCH\_QUEUE\_SET\_SIZE** (since Linux 5.8)

  Preallocates the pipe buffer memory so that it can fit *size* notification messages. Currently, *size* must be between 1 and 512.

- **IOC\_WATCH\_QUEUE\_SET\_FILTER** (since Linux 5.8)

  Watch queue filter can limit events that are received. Filters are passed in a *struct watch\_notification\_filter* and each filter is described by a *struct watch\_notification\_type\_filter* structure.

-

  ```
  struct watch_notification_filter {
          __u32   nr_filters;
          __u32   __reserved;
          struct watch_notification_type_filter filters[];
  };
  struct watch_notification_type_filter {
          __u32   type;
          __u32   info_filter;
          __u32   info_mask;
          __u32   subtype_filter[8];
  };
  ```

## SEE ALSO

[**pipe**(2)](/pipe/2.md), [**ioctl**(2)](/ioctl/2.md)
