Skip to content
systemcoding.dev
Topic

Systems Programming

Processes, threads, files, memory mapping, signals, IPC and sockets through POSIX and Win32: the core every other kind of system is built on.

Flat illustration of two options weighed side by side, with the GNU, C and C++ logos.
Systems Programming

Use strerror_r Correctly: XSI vs GNU Versions

strerror_r has two incompatible signatures in glibc. Learn which one you get, how to write code that works with both, and how strerror_l avoids the problem.

6 min read
Flat illustration of user space above the system call boundary, the kernel and the hardware, with the C, Linux and GNU logos.
Systems Programming

Common errno Values and What They Mean

A cheat sheet of the errno values you meet most on Linux, such as ENOENT, EACCES, EINTR and EAGAIN, with the cause, the reaction and when not to retry.

6 min read
Flat illustration of user space above the system call boundary, the kernel and the hardware, with the macOS, Linux and Apple logos.
KernelsGuide

The Complete Guide to macOS Kernel Internals

A map of the XNU kernel behind macOS: Mach tasks and ports, the BSD layer, IOKit, system call entry, virtual memory, security layers, extensions and boot.

25 min read
Flat illustration of a shield with a lock, a key and a password field, with the C, Rust and OpenSSL logos.
Security

Off-by-One Errors in C String Handling

One byte too few for the terminating NUL is enough to corrupt memory. See the common off-by-one patterns in C strings and how to write them correctly.

6 min read
Flat illustration of user space above the system call boundary, the kernel and the hardware, with the C, GNU and Linux logos.
Systems Programming

What Is errno and How Does It Work in C

errno is a per-thread integer that C library and system calls set on failure. Learn when it is valid and how to read it correctly with glibc 2.41.

7 min read
Flat illustration of user space above the system call boundary, the kernel and the hardware, with the Linux, C and Rust logos.
KernelsGuide

The Complete Guide to Linux Kernel Modules

A complete guide to Linux kernel modules: lifecycle, build, load, parameters, exported symbols, a working misc device, licensing, signing, DKMS and debugging.

27 min read

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.