๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Linux Programming by Example: The Fundamentals

โœ Scribed by Arnold Robbins


Publisher
Prentice Hall Professional Technical Reference
Year
2004
Tongue
English
Leaves
721
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Table of Contents


Cover......Page 1
Contents......Page 6
Preface......Page 18
PART I: Files and Users......Page 34
Chapter 1 Introduction......Page 36
1.1 The Linux/Unix File Model......Page 37
1.2 The Linux/Unix Process Model......Page 43
1.3 Standard C vs. Original C......Page 45
1.4 Why GNU Programs Are Better......Page 47
1.5 Portability Revisited......Page 52
1.6 Suggested Reading......Page 53
1.7 Summary......Page 54
Exercises......Page 55
Chapter 2 Arguments, Options, and the Environment......Page 56
2.1 Option and Argument Conventions......Page 57
2.2 Basic Command-Line Processing......Page 61
2.3 Option Parsing: getopt ( ) and getopt_long ( )......Page 63
2.4 The Environment......Page 73
2.5 Summary......Page 82
Exercises......Page 83
Chapter 3 User-Level Memory Management......Page 84
3.1 Linux/Unix Address Space......Page 85
3.2 Memory Allocation......Page 89
3.3 Summary......Page 113
Exercises......Page 114
Chapter 4 Files and File I/O......Page 116
4.2 Presenting a Basic Program Structure......Page 117
4.3 Determining What Went Wrong......Page 119
4.4 Doing Input and Output......Page 124
4.5 Random Access: Moving Around within a File......Page 135
4.6 Creating Files......Page 139
4.7 Forcing Data to Disk......Page 146
4.8 Setting File Length......Page 147
Exercises......Page 148
Chapter 5 Directories and File Metadata......Page 150
5.1 Considering Directory Contents......Page 151
5.2 Creating and Removing Directories......Page 163
5.3 Reading Directories......Page 165
5.4 Obtaining Information about Files......Page 172
5.5 Changing Ownership, Permission, and Modification Times......Page 188
5.6 Summary......Page 195
Exercises......Page 196
Chapter 6 General Library Interfacesโ€”Part 1......Page 198
6.1 Times and Dates......Page 199
6.2 Sorting and Searching Functions......Page 214
6.3 User and Group Names......Page 228
6.4 Terminals: isatty()......Page 235
6.6 Summary......Page 236
Exercises......Page 238
Chapter 7 Putting It All Together: ls......Page 240
7.1 V7 ls Options......Page 241
7.2 V7 ls Code......Page 242
7.3 Summary......Page 258
Exercises......Page 259
Chapter 8 Filesystems and Directory Walks......Page 260
8.1 Mounting and Unmounting Filesystems......Page 261
8.2 Files for Filesystem Administration......Page 271
8.3 Retrieving Per-Filesystem Information......Page 277
8.4 Moving Around in the File Hierarchy......Page 289
8.5 Walking a File Tree: GNU du......Page 302
8.6 Changing the Root Directory: chroot ( )......Page 309
8.7 Summary......Page 310
Exercises......Page 311
PART II: Processes, IPC, and Internationalization......Page 314
Chapter 9 Process Management and Pipes......Page 316
9.1 Process Creation and Management......Page 317
9.2 Process Groups......Page 345
9.3 Basic Interprocess Communication: Pipes and FIFOs......Page 348
9.4 File Descriptor Management......Page 353
9.5 Example: Two-Way Pipes in gawk......Page 370
9.6 Suggested Reading......Page 374
9.7 Summary......Page 375
Exercises......Page 377
Chapter 10 Signals......Page 380
10.2 Signal Actions......Page 381
10.3 Standard C Signals: signal ( ) and raise ( )......Page 382
10.4 Signal Handlers in Action......Page 386
10.5 The System V Release 3 Signal APIs: sigset ( ) et al......Page 398
10.6 POSIX Signals......Page 400
10.7 Signals for Interprocess Communication......Page 412
10.8 Important Special-Purpose Signals......Page 415
10.9 Signals Across fork ( ) and exec ( )......Page 431
10.10 Summary......Page 432
Exercises......Page 434
Chapter 11 Permissions and User and Group ID Numbers......Page 436
11.1 Checking Permissions......Page 437
11.2 Retrieving User and Group IDs......Page 440
11.3 Checking As the Real User: access ( )......Page 443
11.5 Setting Extra Permission Bits for Directories......Page 445
11.6 Setting Real and Effective IDs......Page 448
11.7 Working with All Three IDs: getresuid ( ) and setresuid ( ) (Linux)......Page 454
11.8 Crossing a Security Minefield: Setuid root......Page 455
11.9 Suggested Reading......Page 456
11.10 Summary......Page 457
Exercises......Page 459
Chapter 12 General Library Interfacesโ€”Part 2......Page 460
12.1 Assertion Statements: assert ( )......Page 461
12.2 Low-Level Memory: The memXXX ( ) Functions......Page 465
12.3 Temporary Files......Page 469
12.4 Committing Suicide: abort ( )......Page 478
12.5 Nonlocal Gotos......Page 479
12.6 Pseudorandom Numbers......Page 487
12.7 Metacharacter Expansions......Page 494
12.8 Regular Expressions......Page 504
12.9 Suggested Reading......Page 513
12.10 Summary......Page 514
Exercises......Page 515
Chapter 13 Internationalization and Localization......Page 518
13.1 Introduction......Page 519
13.2 Locales and the C Library......Page 520
13.3 Dynamic Translation of Program Messages......Page 540
13.4 Can You Spell That for Me, Please?......Page 554
13.6 Summary......Page 559
Exercises......Page 560
Chapter 14 Extended Interfaces......Page 562
14.1 Allocating Aligned Memory: posix_memalign ( ) and memalign ( )......Page 563
14.2 Locking Files......Page 564
14.3 More Precise Times......Page 576
14.4 Advanced Searching with Binary Trees......Page 584
14.5 Summary......Page 595
Exercises......Page 596
PART III: Debugging and Final Project......Page 598
Chapter 15 Debugging......Page 600
15.1 First Things First......Page 601
15.2 Compilation for Debugging......Page 602
15.3 GDB Basics......Page 603
15.4 Programming for Debugging......Page 610
15.5 Debugging Tools......Page 638
15.6 Software Testing......Page 665
15.7 Debugging Rules......Page 666
15.8 Suggested Reading......Page 670
15.9 Summary......Page 671
Exercises......Page 672
Chapter 16 A Project That Ties Everything Together......Page 674
16.1 Project Description......Page 675
16.2 Suggested Reading......Page 677
PART IV: Appendixes......Page 680
Appendix A: Teach Yourself Programming in Ten Years......Page 682
Appendix B: Caldera Ancient UNIX License......Page 688
Appendix C: GNU General Public License......Page 690
A......Page 700
B......Page 701
C......Page 702
D......Page 703
E......Page 704
F......Page 705
G......Page 706
I......Page 708
L......Page 709
M......Page 710
O......Page 711
P......Page 712
R......Page 714
S......Page 715
T......Page 717
U......Page 718
Z......Page 720


๐Ÿ“œ SIMILAR VOLUMES


Linux Programming by Example:The Fundame
โœ Arnold Robbins ๐Ÿ“‚ Library ๐Ÿ“… 2004 ๐Ÿ› Prentice Hall ๐ŸŒ English

ๅ†…ๅฎน็ฎ€ไป‹ ยท ยท ยท ยท ยท ยท Linux Programming by Example introduces new Linux programmers to the core Linux programming interfaces in a gradual, consistent fashion, progressing intuitively from the basic to the more complex. It covers I/O, file metainformation, users and groups, processes, basic interprocess

Linux Programming by Example
โœ Kurt Wall ๐Ÿ“‚ Library ๐Ÿ“… 1999 ๐Ÿ› Que ๐ŸŒ English

For Linux courses covering programming where students have had exposure to C programming. Linux Programming By Example covers the basics to allow students to start programming working applications in a Linux environment. It assumes students have some knowledge of C, but no experience in Linux. It c

Linux Programming by Example: The Fundam
โœ Arnold Robbins ๐Ÿ“‚ Library ๐Ÿ“… 2004 ๐ŸŒ English

Anyone who's done programming work knows that you spend half your coding time looking for other people's solutions to the problems you're facing in your project. Particularly when you're dealing with times, dates, standard calculations, and other common problems, you find yourself saying, "Someone m

Linux Socket Programming by Example
โœ Warren Gay ๐Ÿ“‚ Library ๐Ÿ“… 2000 ๐Ÿ› Que ๐ŸŒ English

Linux Socket Programming by Example begins with a very basic introduction to the fundamentals of socket level programming. As the chapters progress, you are introduced to related concepts, such as forming network addresses, Ipv6, the TCP/IP protocol suite and options, writing servers, and creating s

Programming Language Fundamentals by Exa
โœ D.E. Stevenson ๐Ÿ“‚ Library ๐Ÿ“… 2006 ๐Ÿ› Auerbach Publications ๐ŸŒ English

Written in an informal yet informative style, Programming Language Fundamentals by Example uses active learning techniques, giving students a professional learning experience based on professional methods applied with professional standards. It provides an understanding of the many languages and no