Linux应用程序开发(第二版 英文版)

Linux应用程序开发(第二版 英文版)
作 者: 约翰逊 特罗安
出版社: 人民邮电出版社
丛编项: 典藏原版书苑
版权说明: 本书为出版图书,暂不支持在线阅读,请支持正版图书
标 签: Linux
ISBN 出版时间 包装 开本 页数 字数
未知 暂无 暂无 未知 0 暂无

作者简介

  本书提供作译者介绍Michael K. Johnson是Specifix公司的操作系统工程师。他曾是Red Hat的操作系统开发人员,在那里他管理一个内核开发小组长达3年半的时间,他是Fedora项目基础技术负责人。他还曾做过有关Linux应用程序开发的教学工作。Erik W. Troan是Specifix公司的合伙创始人和执行副总裁。他曾经是Red Hat公司产品工程部的副总裁,负责规格描述和创建技术,例如RPM、Linux操作系统、Red Hat网络、高性能服务器以及Red Had网站的基础设施。

内容简介

本书介绍了在Linux环境下开发应用程序需要掌握的知识,对编程实践中经常遇到的问题进行了详细的讲解,并提供了典型实例加以说明。全书共分为4个部分。第一部分介绍初学者需要了解的知识,包括Linux的历史、从事自由软件开发需要了解的版权知识和GPL等许可证,以及如何获取和使用在线文档系统。第二部分介绍了开发环境和工具,其中包括Emacs编辑器、vi编辑器及gdb调试器的使用,gcc的选项和扩展,GNU C库的基本知识,内存溢出和泄漏的调试工具,如何创建、使用、管理静态库和动态库,以及如何通过系统调用请求系统服务。第三部分详细介绍了Linux系统编程知识,其中包括进程模型、简单文件管理、信号处理、高级文件操作、目录操作、作业控制、终端与伪终端、socket网络、时间和定时器、随机数、虚拟控制台、Linux控制台以及如何编写安全的程序。第四部分精选了Linux编程中最常用的开发库进行介绍,其中包括字符串匹配、用于终端编程的S-Lang库、基于散列的数据库函数库、命令行解析库,如何运行时动态加载共享对象,以及有关用户身份识别和验证的库。.本书内容丰富、实用,适合需要开发Linux软件,或者需要把软件从其他平台移植到Linux上的程序员阅读。..本书特色:·书中源代码源自工程实例,可以在网上下载。·本书作者是Linux程序员的领军人物。·一本备受好评的Linux程序开发经典。“本书的第一版总是放在我桌上举手可及的地方,因为它非常好地解释了Linux用户态API的所有领域。而第二版更为出色,我将用它来取代第一版。”—— Greg Kroah-Hartman著名Linux内核程序员

图书目录

Contents

Part 1 Getting Started

Chapter 1 History of Linux Development

1.1 A Short History of Free Unix Software

1.2 Development of Linux

1.3 Notional Lineage of Unix Systems

1.4 Linux Lineage

Chapter 2 Licenses and Copyright

2.1 Copyright

2.2 Licensing

2.3 Free Software Licenses

Chapter 3 Online System Documentatiion

3.1 The man Pages

3.2 The Info Pages

3.3 Other Documetation

Part 2 Development Tools and Environment

Chapter 4 Development Tools

4.1 Editors

4.2 Make

4.3 The GNU Debugger

4.4 Tracing Program Actions

Chapter 5 gcc Options and Extenslons

5.1 gcc Options

5.2 Header Files

Chapter 6 The GNU C Library

6.1 Feature Selection

6.2 POSIX Interfaces

6.3 Compatibilit y

Chapter 7 Memory Debugging Tools

7.1 Buggy Code

7.2 Memory-Checking Tools Included in glibc

7.3 Finding Memory Leaks with mpr

7.4 Investigating Memory Errors with Valgrind

7.5 Electric Fence

Chapter 8 Creating and Using Libraries

8.1 Static Libraries

8.2 Shared Libraries

8.3 Designing Shared Libraries

8.4 Building Shared Libraries

8.5 Installing Shared Libraries

8.6 Using Shared Libraries

Chapter 9 Linux System Envlronment

9.1 The Process Environment

9.2 Understanding System Calls

9.3 Finding Header and Library Files

Part 3 System Programming

Chapter 10 The Process Model

10.1 Defining a Process

10.2 Process Attributes

10.3 Process Information

10.4 Process Primitives

10.5 Simple Chidren

10.6 Sessions and rocess Groups

10.7 Introduction to LADSH

10.8 Creating Clones

Chapter 11 Simple File Handling

11.1 The File Mode

11.2 Basic File Operations

11.3 Querying and Changing Inode Information

11.4 Manipulating Directory Entries

11.5 Manipulating File Descriptors

11.6 Ceaating Unnamed Pipes

11.7 Adding Redirection to LADSH

Chapter 12 Signal Processing

12.1 Signal Concepts

12.2 The Linux (and POSIX)Signal API

12.3 Available Signals

12.4 Writing Signal Handlers

12.5 Reopening Log Files

12.6 Real-Time Signals

12.7 Learning About a Signal

Chatpter 13 Advanced File Handling

13.1 Input and utput Multiplexing

13.2 Memory Mapping

13.3 File Locking

13.4 Alternatives to read()and write()

Chapter 14 Directory Operations

14.1 The Current Working Directory

14.2 Changing the Root Directory

14.3 Creating and Removing Directories

14.4 Reading a Directory’s Contents

14.5 File Name Globbing

14.6 Adding Directories and Globbing to ladsh

14.7 Walking File System Trees

14.8 Directory Change Notification

Chapter 15 Job Control

15.1 Job Control Basics

15.2 Job Control in ladsh

Chapter 16 Terminals and Pseudo Terminals

16.1 TTY Operations

16.2 termios Overview

16.3 termios Examples

16.4 termios Debugging

16.5 termios Reference

16.6 Pseudo ttys

Chapter 17 Networking with Sockets

17.1 Protocol Support

17.2Utility Functions

17.3 Basic Socket Operations

17.4 Unix Domain Sockets

17.5 Networking Machines with TCP/IP

17.6 Using UDP Datagrams

17.7 Socket Errors

17.8 Legacy Networking Functions

Chapter 18 Time

18.1 Telling Time and Dates

18.2 Using T imers

Chapter 19 Random Numbers

19.1 Pseudo-Random Numbers

19.2 Cryptography and Random Numbers

Chapter 20 Programing Virtual Consoles

20.1 Getting Started

20.2 Beeping

20.3 Determining Whether the Terminal Is a vc

20.4 Finding the Current VC

20.5 Managing VC Switching

20.6 Example:The open Command

Chapter 21 The Linux Console

21.1 Capability Databases

21.2 Glyphs,Characters,and Maps

21.3 Linux Console Capabilities

21.4 Direct Screen Writing

Chapter 22 Writing Secure Programs

22.1 When Security Matters

22.2 Minimizing the Opportunity for Attack

22.3 Common Security Holes

22.4 Running as a Daernon

Part 4 Development Libraries

Chapter 23 String Matching

23.1 Globbing Arbitrary Strings

23.2 Regular Expressions

Chapter 24 Terminal Handling with S-Lang

24.1 Input Handling

24.2 Output Handling

Chapter 25 Hased Database Library

25.1 Overview

25.2 Basic Operations

25.3 Reading Records

25.4 Modifying the Database

25.5 Example

Chapter 26 Parsing Command-Line Options

26.1 The Option Table

26.2 Using the Option Table

26.3 Using Callbacks

26.4 Error Handling

26.5 Option Aliasing

26.6 Parsing Argument Strings

26.7 Handling Extra Arguments

26.8 Sample Application

Chapter 27 Dynamic Loading at Run Time

27.1 The di Interface

Chapter 28 User Identfication and Authentication

28.1 ID-to-Name Transation

28.2 Pluggable Authentication Modules

A ppendices

Appendix A Header Files

Appendix B ladsh Source Code

Glossary

Bibliography

Index