---
name: "capng_get_caps_process"
section: "3"
platform: "linux"
package: "libcap-ng"
version: "0.9.6-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/capng_get_caps_process"
---

# capng\_get\_caps\_process(3)

get the capabilities from a process

## NAME

capng\_get\_caps\_process - get the capabilities from a process

## SYNOPSIS

**#include \<cap-ng.h\>**

int capng\_get\_caps\_process(void);

## DESCRIPTION

capng\_get\_caps\_process will get the capabilities and bounding set of the pid stored inside libcap-ng's state table. The default is the pid of the running process. This can be changed by using the capng\_setpid function.

## RETURN VALUE

This returns 0 on success and -1 on failure.

## NOTES

If you are doing multi-threaded programming, calling this function will only get capabilities on the calling thread. If you want to get overall capabilities for a multi-threaded process, you can only do that before creating any threads. Afterwards, threads may be able to independently set capabilities.

capng\_get\_caps\_process needs a mounted /proc to read the current bounding set, otherwise it will fail.

## SEE ALSO

[**capng\_setpid**(3)](/capng_setpid/3.md), [**capabilities**(7)](/capabilities/7.md)

## AUTHOR

Steve Grubb
