没有合适的资源?快使用搜索试试~ 我知道了~
The GNU C Library:System & Network Applications
5星 · 超过95%的资源 需积分: 3 36 下载量 138 浏览量
2009-01-16
16:23:13
上传
评论
收藏 2.7MB PDF 举报
温馨提示
试读
624页
GNU c库,系统和网络部分.系统级和网络部分的编程接口.此为第二部分.
资源推荐
资源详情
资源评论
The GNU C Library:
System & Network Applications
For GNU C Libraries version 2.3.x
by Sandra Loosemore
with Richard M. Stallman, Roland McGrath,
Andrew Oram, and Ulrich Drepper
This manual documents the GNU C Libraries version 2.3.x.
ISBN 1-882114-24-8, First Printing, March 2004.
Published by:
GNU Press Website: www.gnupress.org
a division of the General: press@gnu.org
Free Software Foundation Orders: sales@gnu.org
51 Franklin St, Fifth Floor Tel: 617-542-5942
Boston, MA 02110-1301 USA Fax: 617-542-2652
Copyright © 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.2, or any later version
published by the Free Software Foundation; with the Invariant Sections being “Free
Software and Free Manuals”, the “GNU Free Documentation License”," and the
“GNU Lesser General Public License”, with the Front Cover Texts being “A GNU
Manual”, and with the Back Cover Texts as in (a) below. A copy of the license is
included in the section entitled “GNU Free Documentation License”.
(a) The Back Cover Text is: You are free to copy and modify this GNU Manual.
Buying copies from GNU Press supports the FSF in developing GNU and promoting
software freedom.
Cover art by Etienne Suvasa. Cover design by Jonathan Richard. Printed in USA.
i
Short Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Low-Level Input/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3 File-System Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4 Pipes and FIFOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
5 Sockets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
6 Low-Level Terminal Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
7 Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
8 Job Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
9 System Databases and Name-Service Switch . . . . . . . . . . . . . . . . 243
10 Users and Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
11 System Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
12 System-Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 303
13 DES Encryption and Password Handling . . . . . . . . . . . . . . . . . . . 327
14 Resource Usage and Limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
15 Syslog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
16 Nonlocal Exits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
17 Signal Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
18 POSIX Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
A C Language Facilities in the Library . . . . . . . . . . . . . . . . . . . . . . . 455
B Summary of Library Facilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
C Installing the GNU C Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
D Library Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
E Contributors to the GNU C Library . . . . . . . . . . . . . . . . . . . . . . . . 557
F Free Software Needs Free Documentation . . . . . . . . . . . . . . . . . . . 561
G GNU Lesser General Public License . . . . . . . . . . . . . . . . . . . . . . . 563
H GNU Free Documentation License . . . . . . . . . . . . . . . . . . . . . . . . 573
Concept Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581
Type Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
Function and Macro Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
Variable and Constant Macro Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
Program and File Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
ii The GNU C Library: System & Network Applications
iii
Table of Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Standards and Portability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2.1 ISO C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.2 POSIX (The Portable Operating System Interface) . . . . . . 2
1.2.3 Berkeley Unix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.4 SVID (The System V Interface Description) . . . . . . . . . . . . 3
1.2.5 XPG (The X/Open Portability Guide) . . . . . . . . . . . . . . . . . . 3
1.3 Using the Library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 Header Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.2 Macro Definitions of Functions . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.3 Reserved Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.4 Feature-Test Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Road Map to the Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2 Low-Level Input/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.1 Opening and Closing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2 Input and Output Primitives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.3 Setting the File Position of a Descriptor . . . . . . . . . . . . . . . . . . . . . . . . 25
2.4 Descriptors and Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.5 Dangers of Mixing Streams and Descriptors . . . . . . . . . . . . . . . . . . . . 29
2.5.1 Linked Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.5.2 Independent Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.5.3 Cleaning Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.6 Fast Scatter-Gather I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.7 Memory-Mapped I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.8 Waiting for Input or Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.9 Synchronizing I/O Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.10 Perform I/O Operations in Parallel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.10.1 Asynchronous Read and Write Operations . . . . . . . . . . . 45
2.10.2 Getting the Status of AIO Operations . . . . . . . . . . . . . . . . 49
2.10.3 Getting into a Consistent State . . . . . . . . . . . . . . . . . . . . . . 50
2.10.4 Cancellation of AIO Operations . . . . . . . . . . . . . . . . . . . . . 52
2.10.5 How to Optimize the AIO Implementation . . . . . . . . . . . 53
2.11 Control Operations on Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.12 Duplicating Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.13 File-Descriptor Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.14 File Status Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.14.1 File-Access Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.14.2 Open-Time Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.14.3 I/O Operating Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.14.4 Getting and Setting File Status Flags . . . . . . . . . . . . . . . . 63
剩余623页未读,继续阅读
资源评论
- vanyee2013-12-16权威详细的编程参考
- 阿孙哥2011-10-11挺不错的,非扫描版,挺不错的
魔鬼筋肉人
- 粉丝: 10
- 资源: 49
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功