prctl
prctl is a Linux system call used to control certain attributes of a process at runtime. It provides a mechanism for querying or configuring various per-process properties and is commonly used by daemons, containers, and security-sensitive programs. The interface is exposed in C as int prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5) and is declared in sys/prctl.h. A successful call returns 0; on error, -1 is returned with errno set.
Typical uses of prctl include setting or getting the process name, constraining privileges, and enabling security
Notes on usage and scope are important. prctl affects the calling thread or the process depending on