NS_GET_NSTYPE(2const)

NS_GET_NSTYPE2const

Discovering the namespace type

Usage

#include <linux/nsfs.h>  /* Definition of NS_GET_NSTYPE */
#include <sys/ioctl.h>

int ioctl(int fd, NS_GET_NSTYPE);

Overview

The NS_GET_NSTYPE operation can be used to discover the type of namespace referred to by the file descriptor fd.

fd refers to a /proc/pid/ns/* file.

Return value

On success, the return value is one of the CLONE_NEW* values that can be specified to clone(2) or unshare(2) in order to create a namespace.

On error, -1 is returned, and errno is set to indicate the error.

Releases

2 releases since Debian 13 (Trixie); the text changed 1 time.

  1. 13
  2. Arch

Standards

Linux.

History

Linux 4.11.

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