Viewing process capabilities via procfs

To understand more details, we need a quick way to "look into" the kernel and retrieve information; the Linux kernel's proc filesystem (often abbreviated to procfs) provides just this feature (along with more).

Procfs is a pseudo-filesystem typically mounted on /proc. Exploring procfs to learn more about Linux is a great idea; do check out some links in the Further reading section on the GitHub repository.

Here, we shall just focus on the task at hand: to get to the details, procfs exposes a directory called /proc/self (which refers to the current process's context, somewhat analogous to the this pointer in OOP); under it, a pseudo file named status reveals interesting details about the process (or ...

Get Hands-On System Programming with Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.