
Rago carefully retains the spirit and approach that made this book a classic. Building on Stevens' work, he begins with basic topics such as files, directories, and processes, carefully laying the groundwork for understanding more advanced techniques, such as signal handling and terminal I/O. Substantial new material includes chapters on threads and multithreaded programming, using the socket interface to drive interprocess communication (IPC), and extensive coverage of the interfaces added to the latest version of the POSIX. 1 standard. Nearly all examples have been tested on four of today's most widely used UNIX/Linux platforms: FreeBSD 5.2.1; the Linux 2.4.22 kernel; Solaris 9; and Darwin 7.4.0, the FreeBSD/Mach hybrid underlying Apple's Mac OS X 10.3. As in the first edition, you'll learn through example, including more than 10,000 lines of downloadable, ANSI C source code. More than 400 system calls and functions are demonstrated with concise, complete programs that clearly illustrate their usage, arguments, and return values. To tie together what you've learned, the book presents several chapter-length case studies, each fully updated for contemporary environments. Advanced Programming in the UNIX® Environment has helped ageneration of programmers write code with exceptional power, performance, and reliability. Now updated for today's UNIX/Linux systems, this second edition will be even more indispensable.
Technical books, especially for practitioners, that stay relevant over a long period of time are rather rare. I wish I could say that I've had time to study TAoCP or SICP, but I haven't.
Some of what I did find useful back in the day were: Advanced Programming in the Unix Environment by Stevens, Stan Lippman's C++ book, Code Complete by Steve McConnell, the GoF Design Patterns book, Working Effectively With Legacy Code by Michael Feathers, and Introduction to Artificial Intelligence by Charniak and McDermott.
Whether, and to what extent, any of them are useful now is hard to say. Depends what you want to learn and what you're doing. The Charniak book, for example, is about classic "good old fashioned" AI, not the currently dominant connectionist approach. But it's LISP, and LISP is always relevant.
I'd also add The Systems Bible by John Gall as a book that influenced me. Its not a technology book though.
Then you can pick up some book on shells (Effective Linux at the Command Line is one I'm going through right now), and you can piece a lot of it together.
There's no magic, just a combo of decent ideas working together. But no single idea is hard to implement. Maybe just hard to come up with from scratch.
The PoC||GTFO series, I only have vols 1 & 2, have to be some of the most fascinating books ever published. These and Stevens’ Advanced Programming in the Unix Environment are the most fun in my bookcase.
Tip: Many of these old books can be had for cheap as used copies on Amazon/Betterworldbooks etc.
https://www.amazon.com/Advanced-Programming-UNIX-Environment...
It is about using all Unix APIs from user space, including signals and processes.
(I am not sure what to recommend if you want to implement signals in the kernel, maybe https://pdos.csail.mit.edu/6.828/2012/xv6.html )
---
It's honestly a breath of fresh air to simply read a book that explains clearly how Unix works, with self-contained examples, and which is comprehensive and organized. (If you don't know C, that can be a barrier, but that's also a barrier reading blog posts)
I don't believe the equivalent information is anywhere on the web. (I have a lot of Unix trivia on my blog, which people still read, but it's not the same)
IMO there are some things for which it's really inefficient to use blog posts or Google or LLMs, and if you want to understand Unix signals that's probably one of them.
(This book isn't "cheap" even used, but IMO it survives with a high price precisely because the information is valuable. You get what you pay for, etc. And for a working programmer it is cheap, relatively speaking.)
However, K&R was last updated when the ANSI C standard was ratified, and there has been many important changes to C since then. Moreover, there are important safety concerns that need to be taken to account with coding in C, such as opting for functions like strlcpy for copying strings instead of the classic strcpy or the better-but-still-dangerous strncpy.
Once you are familiar with C, I then recommend learning some Unix system calls. I highly recommend looking at the source code of Unix utilities, and I also recommend textbooks such as Advanced Programming in the Unix Environment to learn more about Unix system calls.
When I was an undergrad at Cal Poly San Luis Obispo over 15 years ago, all computer science majors were required to take an intensive course on Unix systems programming in C. We built many projects, such as HTTP servers and shells. I highly recommend building projects like these to get very proficient in C.