A Gopher's Guide to *NIX Plumbing
summary
Walks through concrete Go code that spawns and controls processes using os/exec, os and syscall, sets timers and tickers that fire every second, coordinates concurrent work with sync (weight groups), and builds real IPC with pipes and a simple CR‑terminated message protocol. Demonstrates signal handling (sending SIGINT/SIGTERM and a SIGUSR ping‑pong), observes 3 concurrent child processes with sequential PIDs, and shows a CGO semaphore wrapper that creates and uses a named semaphore; examples run and interoperate on macOS/Linux.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 0:46Speaker’s Unix journey
- 3:14Why Go excels on Unix
- 5:25Unsafe Unix practices
- 7:53Go packages for process control
- 10:59Parallel subprocess execution
- 16:20Process creation with exec.Cmd
- 20:59Inter-process signals
- 27:22Signal exchange between processes
- 31:42Managing child processes with pipes
- 44:01Unix pipes explained
- 49:20CGO for Unix system calls
- 57:32Syscall semaphores
- 1:02:07Resources and closing
related talks
39mThe Beginner's Guide to Linux Syscalls
22mWriting a Container Runtime in Go
23mLife of a Container
42mSandboxing a Linux application
59mThe Wild West of post-POSIX IO Interfaces
01h 25mSandboxing a Linux Application
01h 26mLinux User/Kernel ABI: the realities of how C and C++ programs really talk to the OS
36mA Beginner's Guide to eBPF Programming with Go
