| A systemd Unit |
13. Writing a Daemon |
| A UDP Client |
08. UDP & Datagrams |
| A UDP Server |
08. UDP & Datagrams |
| Batching Syscalls with bufio |
11. Zero-Copy & Efficient I/O |
| Catching Signals |
06. Signals & Lifecycle |
| Changing Permissions and Ownership |
03. Permissions Users & Privileges |
| Channels Versus Pipes and Sockets |
04. Pipes Redirection & IPC |
| Command Pipelines |
05. Running Processes |
| Config and Flags |
14. Capstone Monitoring Daemon |
| Conn Is a Reader and a Writer |
07. TCP from the Socket Up |
| Counting CPUs |
10. Introspecting the System |
| Cross-Compilation |
12. CLI Tools & Cross-Compilation |
| Datagram Size and Truncation |
08. UDP & Datagrams |
| Deadlines and Timeouts |
07. TCP from the Socket Up |
| Environment and Working Directory |
05. Running Processes |
| Errno as a Portable Sentinel |
01. The OS Interface & Syscalls |
| Exit Codes |
12. CLI Tools & Cross-Compilation |
| File Capabilities |
03. Permissions Users & Privileges |
| File Descriptors |
01. The OS Interface & Syscalls |
| File I/O Is Different |
09. The Netpoller |
| File Metadata with Stat |
02. File I/O Deep |
| Flags with the flag Package |
12. CLI Tools & Cross-Compilation |
| Foreground, Not Double-Fork |
13. Writing a Daemon |
| Framing a Line Protocol |
07. TCP from the Socket Up |
| Goroutines, Threads, and Processors |
09. The Netpoller |
| Graceful Shutdown |
13. Writing a Daemon |
| Graceful Shutdown with NotifyContext |
06. Signals & Lifecycle |
| Half-Close and Shutdown |
07. TCP from the Socket Up |
| Ignoring and Restoring Signals |
06. Signals & Lifecycle |
| In-Memory Pipes with io.Pipe |
04. Pipes Redirection & IPC |
| Interrupted Syscalls |
01. The OS Interface & Syscalls |
| io.Copy and the Fast-Path Interfaces |
11. Zero-Copy & Efficient I/O |
| Keeping the Fast Path |
11. Zero-Copy & Efficient I/O |
| Kernel Pipes with os.Pipe |
04. Pipes Redirection & IPC |
| Knowing Your Own Process |
10. Introspecting the System |
| Logging to Standard Out |
13. Writing a Daemon |
| Measure First |
11. Zero-Copy & Efficient I/O |
| Measuring Resource Usage |
10. Introspecting the System |
| No Reliability by Default |
08. UDP & Datagrams |
| Observing the Runtime |
09. The Netpoller |
| Opening Files with OpenFile |
02. File I/O Deep |
| Parking on a Blocked Read |
09. The Netpoller |
| PID Files and Single-Instance |
13. Writing a Daemon |
| Pinning a Goroutine with LockOSThread |
09. The Netpoller |
| Positional Arguments |
12. CLI Tools & Cross-Compilation |
| Privilege Dropping |
03. Permissions Users & Privileges |
| Process Identity |
03. Permissions Users & Privileges |
| Project Layout |
14. Capstone Monitoring Daemon |
| Reading and Writing Bytes |
02. File I/O Deep |
| Reading Exit Codes |
05. Running Processes |
| Reloading Config on SIGHUP |
13. Writing a Daemon |
| Reloading on SIGHUP |
06. Signals & Lifecycle |
| Resource Limits |
10. Introspecting the System |
| Running a Command |
05. Running Processes |
| Running It |
14. Capstone Monitoring Daemon |
| Runtime View Versus OS View |
10. Introspecting the System |
| Scoped I/O with os.Root |
02. File I/O Deep |
| Seeking to Any Offset |
02. File I/O Deep |
| Sendfile |
11. Zero-Copy & Efficient I/O |
| Sending Signals |
06. Signals & Lifecycle |
| Serving Many Clients |
07. TCP from the Socket Up |
| Shipping a Binary |
12. CLI Tools & Cross-Compilation |
| Signals: Reload and Shutdown |
14. Capstone Monitoring Daemon |
| Splice for Connection-to-Connection |
11. Zero-Copy & Efficient I/O |
| Standard Streams and Piping |
12. CLI Tools & Cross-Compilation |
| Standard Streams as File Descriptors |
04. Pipes Redirection & IPC |
| Stats over a Unix Socket |
14. Capstone Monitoring Daemon |
| Symlinks and Lstat |
02. File I/O Deep |
| syscall.Errno |
01. The OS Interface & Syscalls |
| The /proc Filesystem |
10. Introspecting the System |
| The Blocking Thread Problem |
09. The Netpoller |
| The Connectionless Model |
08. UDP & Datagrams |
| The Cost of Copying |
11. Zero-Copy & Efficient I/O |
| The Directory Watcher |
14. Capstone Monitoring Daemon |
| The fork/exec Model |
05. Running Processes |
| The Layer Above |
07. TCP from the Socket Up |
| The PID Lock File |
14. Capstone Monitoring Daemon |
| The Socket Model |
07. TCP from the Socket Up |
| The umask |
03. Permissions Users & Privileges |
| The Unix Permission Model |
03. Permissions Users & Privileges |
| Three Layers of OS Access |
01. The OS Interface & Syscalls |
| Timeouts and Cancellation |
05. Running Processes |
| Unix Domain Sockets |
04. Pipes Redirection & IPC |
| What Is a Syscall |
01. The OS Interface & Syscalls |
| What Signals Are |
06. Signals & Lifecycle |
| When UDP Wins |
08. UDP & Datagrams |
| Wiring Input and Output |
05. Running Processes |
| Wiring main |
14. Capstone Monitoring Daemon |