Skip to content
systemcoding.dev

Tag

posix

44 posts

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

Run Another Program from C with execvp

Run another program from C with execvp on Linux: build argv, search PATH, handle failure, and combine it with fork and waitpid to run a command safely.

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

Create a Child Process in C with fork

Create a child process in C with fork on Linux, tell parent from child by the return value, and avoid the mistakes that run code twice.

7 min read
Flat illustration of network packets crossing between two hosts, with the C, Wireshark and Linux logos.
Networking

Handle Multiple Clients with select

Build a single-threaded C echo server that serves many clients with select, fd_set, FD_SET and FD_ISSET, and learn why you rebuild the set on every loop.

7 min read
Flat illustration of two options weighed side by side, with the C, Linux and Rust logos.
Networking

Blocking vs Non-Blocking I/O Explained

Learn what blocking and non-blocking I/O mean for sockets on POSIX, what EAGAIN tells you, and why servers with many clients switch to non-blocking mode.

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 network packets crossing between two hosts, with the C, Rust and Linux logos.
Networking

Resolve Hostnames in C with getaddrinfo

Resolve hostnames in C with getaddrinfo, walk the result list, connect to the first address that works, and free it with freeaddrinfo on Linux.

6 min read