xcb_shm_attach_fd_checked(3)

xcb_shm_attach_fd_checked3

Create a shared memory segment

Part of xcb_shm_attach_fd(3).

Usage

#include <xcb/shm.h>

Request function

xcb_void_cookie_t xcb_shm_attach_fd(xcb_connection_t *conn, xcb_shm_seg_t shmseg, int32_t shm_fd, uint8_t read_only);

Request arguments

conn

The XCB connection to X11.

shmseg

A shared memory segment ID created with xcb_generate_id().

shm_fd

The file descriptor the server should mmap().

read_only

True if the segment shall be mapped read only by the X11 server, otherwise false.

Overview

Create a shared memory segment. The file descriptor will be mapped at offset zero, and the size will be obtained using fstat(). A zero size will result in a Value error.

Return value

Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the event loop.

If you want to handle errors directly with xcb_request_check instead, use xcb_shm_attach_fd_checked. See xcb-requests(3) for details.

Errors

This request does never generate any errors.

Releases

6 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13–Arch

Author

Generated from shm.xml. Contact [email protected] for corrections and improvements.

From libxcb 1.17.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.