onlooker <
vec...@rediffmail.com> wrote:
> It seems to be the only book purely written on Linux. "Linux System
> Programming, 2nd ed." by Robert Love. As the author says;
> "This book is about system programming on Linux.
> Put another way, the topic of the book is Linux system
> calls and low-level functions such as those defined by the C library.
> While many books cover system programming for Unix systems, few tackle
> the subject with a focus solely on Linux, ... .
There's a huge amount of overlap because Linux is a version
of UNIX, and UNIX systems (nowadays) have a rather well-de-
fined common system API. It's usually a good idea to refrain,
as far as possible, from using extension that work only on
one of the systems since it precludes that your programs
can also be used on other UNIX systems. So I'd also as
others here prefer a book that concentrates on the com-
mon UNIX API and makes it very clear what is stuff that
only works on certain systems.
What you shouldn't expect from a system programming book is
a detailed description of the C library - that's not a sys-
tem-specific API but it's the same on every system for which
a C compler exists (UNIX, Windows and more exotic (hosted)
ones). The functions from the C standard library aren't low-
level - they're implemented on top of the system API (e.g.,
fopen() will call open(), fwrite() write() etc. on UNIX sys-
tems). You better always try to stay aware of what's from
the C API and what from the system API - mixing them can
be dangerous. E.g., using fwrite() (from the C standard
library) and write() (from the UNIX API) on the same open
file can lead to very "interesting" results unless you're
very careful.