Du kanske gillar
The Linux Programming Interface: A Linux and UNIX System Programming Handbook779
The Linux Programming Interface is the definitive guide to the Linux and UNIX programming interfacethe interface employed by nearly every application that runs on a Linux or UNIX system.
- Skickas inom 3-6 vardagar.
- Gratis frakt inom Sverige över 159 kr för privatpersoner.
In this authoritative work, Linux programming expert Michael Kerrisk provides detailed descriptions of the system calls and library functions that you need in order to master the craft of system programming, and accompanies his explanations with clear, complete example programs.
You'll find descriptions of over 500 system calls and library functions, and more than 200 example programs, 88 tables, and 115 diagrams. You'll learn how to:
- Read and write files efficiently
- Use signals, clocks, and timers
- Create processes and execute programs
- Write secure programs
- Write multithreaded programs using POSIX threads
- Build and use shared libraries
- Perform interprocess communication using pipes, message queues, shared memory, and semaphores
- Write network applications with the sockets API
The Linux Programming Interface is the most comprehensive single-volume work on the Linux and UNIX programming interface, and a book that's destined to become a new classic.
Praise for The Linux Programming Interface
"If I had to choose a single book to sit next to my machine when writing software for Linux, this would be it." Martin Landers, Software Engineer, Google
"This book, with its detailed descriptions and examples, contains everything you need to understand the details and nuances of the low-level programming APIs in Linux . . . no matter what the level of reader, there will be something to be learnt from this book." Mel Gorman, Author of Understanding the Linux Virtual Memory Manager
"Michael Kerrisk has not only written a great book about Linux programming and how it relates to various standards, but has also taken care that bugs he noticed got fixed and the man pages were (greatly) improved. In all three ways, he has made Linux programming easier. The in-depth treatment of topics in The Linux Programming Interface . . . makes it a must-have reference for both new and experienced Linux programmers." Andreas Jaeger, Program Manager, openSUSE, Novell
"Michael's inexhaustible determination to get his information right, and to express it clearly and concisely, has resulted in a strong reference source for programmers. While this work is targeted at Linux programmers, it will be of value to any programmer working in the UNIX/POSIX ecosystem." David Butenhof, Author of Pr...
KundrecensionerHar du läst boken? Sätt ditt betyg »
<p>Michael Kerrisk has been using and programming UNIX systems for more than 20 years, and has taught many week-long courses on UNIX system programming. Since 2004, he has maintained the "man-pages" project, which produces the manual pages describing the Linux kernel and "glibc" programming APIs. He has written or co-written more than 250 of the manual pages and is actively involved in the testing and design review of new Linux kernel-userspace interfaces. Michael lives with his family in Munich, Germany.
InnehållsförteckningPraise for The Linux Programming Interface; Dedication; Preface; ; Chapter 1: History and Standards; 1.1 A Brief History of UNIX and C; 1.2 A Brief History of Linux; 1.3 Standardization; 1.4 Summary; Chapter 2: Fundamental Concepts; 2.1 The Core Operating System: The Kernel; 2.2 The Shell; 2.3 Users and Groups; 2.4 Single Directory Hierarchy, Directories, Links, and Files; 2.5 File I/O Model; 2.6 Programs; 2.7 Processes; 2.8 Memory Mappings; 2.9 Static and Shared Libraries; 2.10 Interprocess Communication and Synchronization; 2.11 Signals; 2.12 Threads; 2.13 Process Groups and Shell Job Control; 2.14 Sessions, Controlling Terminals, and Controlling Processes; 2.15 Pseudoterminals; 2.16 Date and Time; 2.17 Client-Server Architecture; 2.18 Realtime; 2.19 The /proc File System; 2.20 Summary; Chapter 3: System Programming Concepts; 3.1 System Calls; 3.2 Library Functions; 3.3 The Standard C Library; The GNU C Library (glibc); 3.4 Handling Errors from System Calls and Library Functions; 3.5 Notes on the Example Programs in This Book; 3.6 Portability Issues; 3.7 Summary; 3.8 Exercise; Chapter 4: File I/O: The Universal I/O Model; 4.1 Overview; 4.2 Universality of I/O; 4.3 Opening a File: open(); 4.4 Reading from a File: read(); 4.5 Writing to a File: write(); 4.6 Closing a File: close(); 4.7 Changing the File Offset: lseek(); 4.8 Operations Outside the Universal I/O Model: ioctl(); 4.9 Summary; 4.10 Exercises; Chapter 5: File I/O: Further Details; 5.1 Atomicity and Race Conditions; 5.2 File Control Operations: fcntl(); 5.3 Open File Status Flags; 5.4 Relationship Between File Descriptors and Open Files; 5.5 Duplicating File Descriptors; 5.6 File I/O at a Specified Offset: pread() and pwrite(); 5.7 Scatter-Gather I/O: readv() and writev(); 5.8 Truncating a File: truncate() and ftruncate(); 5.9 Nonblocking I/O; 5.10 I/O on Large Files; 5.11 The /dev/fd Directory; 5.12 Creating Temporary Files; 5.13 Summary; 5.14 Exercises; Chapter 6: Processes; 6.1 Processes and Programs; 6.2 Process ID and Parent Process ID; 6.3 Memory Layout of a Process; 6.4 Virtual Memory Management; 6.5 The Stack and Stack Frames; 6.6 Command-Line Arguments (argc, argv); 6.7 Environment List; 6.8 Performing a Nonlocal Goto: setjmp() and long jmp(); 6.9 Summary; 6.10 Exercises; Chapter 7: Memory Allocation; 7.1 Allocating Memory on the Heap; 7.2 Allocating Memory on the Stack: alloca(); 7.3 Summary; 7.4 Exercises; Chapter 8: Users and Groups; 8.1 The Password File: /etc/passwd; 8.2 The Shadow Password File: /etc/shadow; 8.3 The Group File: /etc/group; 8.4 Retrieving User and Group Information; 8.5 Password Encryption and User Authentication; 8.6 Summary; 8.7 Exercises; Chapter 9: Process Credentials; 9.1 Real User ID and Real Group ID; 9.2 Effective User ID and Effective Group ID; 9.3 Set-User-ID and Set-Group-ID Progra...