1 .TH "CAPNG_SETPID" "3" "June 2009" "Red Hat" "Libcap-ng API"
3 capng_setpid \- set working pid
7 void capng_setpid(int pid);
11 capng_pid sets the working pid for capabilities operations. This is useful if you want to get the capabilities of a different process.
17 , then the child process will still have the pid of the parent process stored in libcap-ng's internal data. It is disallowed to do any kind of setcap operations because you would be crossing process boundaries. To correct this, if your program links against pthreads, then libcap-ng will use the
19 function (as a weak symbol) to reset the pid information to the new process automatically. You are not required to link against pthreads. You can call
21 and adjust the stored pid manually.
29 .BR capng_get_caps_process (3),