Skip to content
systemcoding.dev

Library

Everything you need to level up your coding skills.

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

Read from stdin or a File Argument Like cat

Write a cat-style filter in C that reads the files named on the command line, uses standard input when there are none, and treats a lone hyphen as stdin.

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

Exit Codes and Conventions for Unix Tools

What exit status 0, 1, 2, 126, 127 and 128 plus a signal number mean on Linux, how a shell reads them, and which codes your own command-line tool should return.

7 min read
Flat illustration of a database beside the table it holds, with the C, GNU and Rust logos.
Systems Programming

Parse Long Options with getopt_long

Use getopt_long in C to accept --name and --name=value options, fill in the option table, handle flags and abbreviations, and keep short options working.

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

Write a Pin Controller Driver With pinctrl

Write a Linux 6.12 pin controller driver: pinctrl_desc, pins, groups and functions, the set_mux callback, and the device tree states that consumers select.

8 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.