Date published 


Linux_Programming/books/The Linux Programming Interface - A Linux and UNIX System Programming Find file Copy path. jason_yao update. “Michael Kerrisk has not only written a great book about Linux programming The Linux programming interface: a Linux and UNIX system programming. 0 standard input. STDIN_FILENO stdin. 1 standard output STDOUT_FILENO stdout. 2 standard error. STDERR_FILENO stderr. The Linux Programming Interface.

Language:English, Spanish, Japanese
Genre:Fiction & Literature
Published (Last):01.12.2015
Distribution:Free* [*Registration needed]
Uploaded by: WALTON

57386 downloads 90898 Views 31.73MB PDF Size Report

The Linux Programming Interface Pdf

The Linux Programming Interface: A Linux and UNIX System Programming Handbook. Home · The Linux Programming Interface: A Linux and UNIX System . THE LINUX. PROGRAMMING. INTERFACE. A Linux and UNIX' System Programming Handbook. MICHAEL KERRISK no starch prass. San Francisco. The Linux Programming Interface (TLPI) is the definitive guide to the Linux and UNIX programming interface—the interface employed by nearly every application .

Programs that explicitly use these interfaces are commonly called system programs, and include applications such as shells, editors, windowing systems, terminal emulators, file managers, compilers, database management systems, virtual machines, network servers, and much of the other software that is employed on a daily basis on Linux systems. Extensively indexed and heavily cross-referenced, The Linux Programming Interface is both an introductory guide for readers new to the topic of system programming, and a comprehensive reference for experienced system programmers. Although this book goes into detail on a wealth of Linux-specific features, it gives careful attention to contemporary Unix programming standards and to portability issues. A former Digital Equipment Corporation programmer and trainer, Kerrisk was more recently an engineer at Google and then a fellow at the Linux Foundation working on kernel-userspace interface design review, testing, and documentation. He is a New Zealander living with his family in Munich, Germany.

Product details Hardcover: No Starch Press; 1 edition October 28, Language: English ISBN Don't have a Kindle? Try the Kindle edition and experience these great reading features: Software Engineering Books.

Computer Science. Is this feature helpful? Thank you for your feedback. Share your thoughts with other customers. Write a customer review.

Read reviews that mention system calls linux programming man pages well written kindle version system programming linux system highly recommend linux kernel technical books linux and unix unix and linux programming interface great reference well organized great book source code operating systems ever read ins and outs.

The Linux Programming Interface: A Linux and UNIX System - TUKG

Top Reviews Most recent Top Reviews. There was a problem filtering reviews right now. Please try again later. Hardcover Verified download. This is without a doubt the best written technical book I've ever read; it's honestly hard to believe only one person wrote and organized it. The material is presented in such a fashion that pretty much anyone with a working knowledge of C can pick it up, sit down, and understand any of its topics.

Kerrisk often opens with a code-light "overview" chapter on the more dense topics e.

Follow the author

He then walks through the topic with an in-depth discussion of the various APIs and excellent example code, crucially often also mentioning now-outdated approaches you will still see pop up, so the reader isn't clueless when encountering pre-POSIX code in real life. It's the rare book indeed which can serve as both an excellently written and illustrated!

If you're a student looking to get into linux systems programming or been assigned some less than high quality reading , pick this up. The fact that the author is also in charge of the man pages project for linux shows in his encyclopedic knowledge--what makes this book so outstanding is his ability to present that knowledge in an easily-digested form with tight, well-written examples.

Yes, it's massive.

But trust me, there isn't a page wasted in here--even if you're experienced in the area, walking through each chapter and digesting Kerrisk's explanations will serve you well. And to any professors or teachers out there who are curious: As a grad student who hasn't been in CS for very long, I was extremely fortunate to be assigned this as a textbook for a systems programming class.

Without this book, there's no way I couldn't have learned as much as I did in a fairly short period of time; more importantly, it made me come to appreciate and enjoy systems programming.

Just all around an excellent book. Great content, relevance, code examples and explanation. I read a lot of tech books and this one definitely stands out. Even if you want to skip the C and just get a great understanding of Linux; this book if for you.

I read through the book, read it again and now reference it. The code that is provided is easy to access as well. This book won't disappoint you if you want to know more about Linux, C programming, Unix operating systems, and much more. One comment on the length of the book; it is long, but not long in that rambling on and on, there is just so much to talk about and he goes depth on so many subjects. Some chapters may not be relevant and you can skip over them without having dependencies on other chapters.

A real look under the hood! This is by far one of the best computer science texts I own. I have read many computer science books by many different publishers and I have to admit I really enjoy the books that I own that were printed by No Starch press. I have a background in web development and had been programming in C for about a year when I downloadd this book.

There is something to learn for everyone in this book, regardless of how many years or decades of experience you have. The book starts with a history of Unix, Linux, and standards, and then progresses into the great detail the inner workings of linux and unix. One of my biggest disappointments with most other programming books is that the authors use bad analogies to explain how things work, or fail to explain how things work at all and only offer a shallow glimpse into the subject.

Some authors seem to go back over their books adding stupid and unintelligent filler to try and make the book longer. This book is over pages and each page is jam packed with information. In fact, I'm sure there was information that was deemed 'not important' enough to make it into this book, and thus the book references how one can find more information on a topic.

I have so many good things to say about this book, I highly recommend it to anybody with an interest in linux systems programming. You will need an understanding of C programming to get through the book.

If you are looking for a book on how to program in C, this is not the book. If you are a C programmer, or are learning C, and would like a book that shows you how to apply your programming knowledge to the linux and unix operating systems, this is a book for you.

This is a book for system admins, network admins, hackers, teachers and professors, students high school, college, or graduate , makers, computer scientists, etc. This is one book that I know I will carry with me everywhere. Definitely a book you want at home, at the office, on the plain, in the car, in the bathroom, or anywhere else you can think of reading! This is the most well written programming book that I own!

See all reviews. site Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more about site Giveaway. This item: Set up a giveaway. Customers who viewed this item also viewed. Linux Bible. Christopher Negus.

The Linux Programming Interface - 电子书网

I found it to be extremely useful and expect to return to it frequently. Anyone who has an interest in programming for Linux will likely feel the same way.

This should be fixed in about 24 hours, but in the meantime the correct location for the code can be found here.

I sooooo needed a book like this that I even contemplated writing it myself. However, a full range of other ebook formats is currently in production, and when those formats are available they will be sold through the usual retail channels and made available to No Starch customers who already have the ebook.

I expect those other formats to be available around mid-February. Also, I don't like physical books because I move quite frequently.

I expect it to become the "Stevens" of Linux low level programming. Besides I use inotify, flock and tmpfs to cover my current IPC needs.

It's huge, but each particular section is well split up, so they are digestible chunks. Those parts I have read so far are interesting and informative. That book is a few years older and obviously less encyclopedic but nonetheless a wonderful and more portable reference.

I have learned the answers to several long-time puzzlements by typing in their examples and picking them apart. Unfortunately it sounds like I need the Kerrisk book too: sigh. Then this happened. I can only say that we were quite glad not to be dependent on that revenue stream Or Flattr buttons, maybe?

Easy for me to propose a whole list of improvements for other to implement, as always! I bought the Kerrisk book last night and another at the same time and am sorry LWN doesn't get a cent. This is a criminally underdocumented and seemingly little known feature Unix domain sockets within the filesystem are just ugly clutter, and serve no useful purpose The abstract namespace is a brilliant concept, which I wish all other Unices would steal For example, real filesystems allow me to use "lsof" to check the list of socket's clients.

Or to use common Unix permissions to control access. But, that's more a shortcoming of lsof than of abstract Unix domain sockets And, using filesystem permissions to control access of Unix domain sockets is highly unportable Many systems totally ignore perms on Unix domain sockets, making them effectively always , like symlinks That's not a shortcoming of lsof, but a shortcoming of having a separate namespace.

It goes against all the Unix traditions. Well, personally I don't care about other Unixes. However, ability to use AppArmor to restrict access to sockets somehow makes me feel more secure.

Not when it comes to sockets, it doesn't How do you think lsof deals with those? Right, it has to deal with a separate namespace Just like it should be taught how to do with Linux's abstract Unix domain namespace What, aside from lsof, actually needs to ever reference a Unix domain socket by pathname as if it were a file, anyway? It's not like you can just pass one to an arbitrary app which is expecting a file, and expect it to do anything sensible Like, for instance, you can do with a named pipe That's a case where existing in the filesystem is actually useful They're just special creatures that happen to be identified via a pathname You can't do that on a socket "file" I'm all in favor of "everything as a file", having used Unix-like systems for well over 20 years now But, I'm not in favor of leaving tons of file-like tokens scattered all over the filesystem, which can't actually be used like files for anything, and which only exist there for the sole purpose of having a unique name to identify them by Which is a shortcoming of Unix design which was fixed in 9p, btw.

How about security with AppArmor? Does your namespace work with chroot?

Also, unix sockets have a creation time which helped me once. Not really. How does Plan9 deal with this? Can you just open up a TCP socket, and somehow specify a host and port to connect to, or one to listen on?

Once you do, does this process-specific socket exist as a separate file for others to see and interact with? I'm not sure I see how it makes much sense, in general Maybe, I know nothing about AppArmor My namespace? Thanks for the credit, but I didn't invent it; I'm just a very big fan of it who regularly uses it I'm not sure I can really conceive of a real-world use for such a thing, however Well, not really; like any other file, they've got modify and change times But, yeah, both will generally reflect creation time I'm not really sure how that'd be of much help in general, though?

Like which? For reasons other than permissions? Not talking about directories or symlinks to them , I assume? Those you can at least readlink like a real symlink Is it really a lot?

The Linux Programming Interface: A Linux and UNIX System Programming Handbook

Even if so, at least you can open them If they had their own directory to live in which everyone used by convention, I wouldn't mind them nearly as much One huge benefit of abstract Unix domain sockets is no need to worry about unlink 'ing them when you're done, and dealing with the race conditions inherent in that They just go away when you exit or close the listening socket With filesystem sockets, a server needs to see if the socket already exists in the filesystem; if so, maybe that means another copy of itself or some other app is using that socket; or, maybe it means it previously crashed before being able to remove that socket Should it unlink it and try to bind it itself?

None of this is needed with abstract Unix domain sockets Review: The Linux Programming Interface Posted Jan 21, UTC Fri by price guest, [ Link ] The reason abstract-namespace sockets are evil is that everything you end up wanting to do to them has to be reinvented, or else you live without.

If on the other hand you use a common abstraction, namely the filesystem, then you get the benefit of all the common tools. You think you wouldn't want that for a socket? Think again. I once had to deal with a buggy server process clvmd that would occasionally hang unkillably due to a kernel bug , while holding an abstract-namespace socket.

This means that when I tried to restart it, the new process would immediately fail because the socket was already bound. If the clvmd authors had used filesystem sockets like good Unix-respecting developers, I could have simply mv'd or even rm'd the old socket, and the new process would have been free to bind to its socket at the usual name.

Instead, I had to restart the box. This was a VM server -- dozens of people's VMs were affected by each restart. The bug recurred a couple of times a day. The program should have used sockets in the filesystem. Maybe they are things YOU and others want to do