Wrox Home  
Search

Topic: Open Source

Beginning Linux Programming, 4th Edition (0470147628) cover image

Beginning Linux Programming, 4th Edition

Neil Matthew, Richard Stones
ISBN: 978-0-470-14762-7
Paperback
816 pages
November 2007
View Previous Edition of This Title
Other Available Formats: E-book
If you are an instructor, you may request an evaluation copy for this title.
Paperback Version: US $39.99 Add to Cart

About This Title  |  Download Code  |  Errata  |  P2P Forum for This Title

Acknowledgements x

Foreword xxiii

Introduction xxv

Chapter 1: Getting Started 1

An Introduction to UNIX, Linux, and GNU 1

Programming Linux 4

Getting Help 14

Summary 16

Chapter 2: Shell Programming 17

Why Program with a Shell? 18

A Bit of Philosophy 18

What Is a Shell? 19

Pipes and Redirection 21

The Shell as a Programming Language 23

Going Graphical — The dialog Utility 75

Putting It All Together 81

Summary 91

Chapter 3: Working with Files 93

Linux File Structure 94

System Calls and Device Drivers 96

Library Functions 97

Low-Level File Access 98

The Standard I/O Library 109

Formatted Input and Output 113

File and Directory Maintenance 120

Scanning Directories 122

Errors 127

The /proc File System 128

Advanced Topics: fcntl and mmap 132

Summary 135

Chapter 4: The Linux Environment 137

Program Arguments 137

Environment Variables 144

Time and Date 148

Temporary Files 156

User Information 158

Host Information 161

Logging 163

Resources and Limits 167

Summary 173

Chapter 5: Terminals 175

Reading from and Writing to the Terminal 175

Talking to the Terminal 180

The Terminal Driver and the General Terminal Interface 182

The termios Structure 184

Terminal Output 196

Detecting Keystrokes 205

Summary 209

Chapter 6: Managing Text-Based Screens with curses 211

Compiling with curses 212

Curses Terminology and Concepts 213

The Screen 216

The Keyboard 221

Windows 224

Subwindows 230

The Keypad 232

Using Color 235

Pads 238

The CD Collection Application 240

Summary 254

Chapter 7: Data Management 255

Managing Memory 255

File Locking 264

Databases 281

The CD Application 289

Summary 309

Chapter 8: MySQL 311

Installation 312

MySQL Administration 320

Accessing MySQL Data from C 335

The CD Database Application 358

Summary 375

Chapter 9: Development Tools 377

Problems of Multiple Source Files 377

The make Command and Makefiles 378

Source Code Control 392

Writing a Manual Page 406

Distributing Software 409

RPM Packages 413

Other Package Formats 424

Development Environments 424

Summary 427

Chapter 10: Debugging 429

Types of Errors 429

General Debugging Techniques 430

Debugging with gdb 437

More Debugging Tools 445

Assertions 452

Memory Debugging 453

Summary 459

Chapter 11: Processes and Signals 461

What Is a Process? 461

Process Structure 462

Starting New Processes 468

Signals 481

Summary 493

Chapter 12: POSIX Threads 495

What Is a Thread? 495

Advantages and Drawbacks of Threads 496

A First Threads Program 497

Simultaneous Execution 501

Synchronization 503

Thread Attributes 512

Canceling a Thread 517

Threads in Abundance 520

Summary 524

Chapter 13: Inter-Process Communication: Pipes 525

What Is a Pipe? 525

Process Pipes 526

Sending Output to popen 528

The Pipe Call 531

Parent and Child Processes 535

Named Pipes: FIFOs 540

The CD Database Application 553

Summary 575

Chapter 14: Semaphores, Shared Memory, and Message Queues 577

Semaphores 577

Shared Memory 586

Message Queues 594

The CD Database Application 599

IPC Status Commands 604

Summary 605

Chapter 15: Sockets 607

What Is a Socket? 608

Socket Connections 608

Network Information 624

Multiple Clients 632

Datagrams 642

Summary 644

Chapter 16: Programming GNOME Using GTK+ 645

Introducing X 645

Introducing GTK+ 648

Events, Signals, and Callbacks 655

Packing Box Widgets 658

GTK+ Widgets 661

GNOME Widgets 676

GNOME Menus 677

Dialogs 682

CD Database Application 687

Summary 699

Chapter 17: Programming KDE Using Qt 701

Introducing KDE and Qt 701

Installing Qt 702

Signals and Slots 705

Qt Widgets 712

Dialogs 727

Menus and Toolbars with KDE 733

CD Database Application Using KDE/Qt 738

Summary 746

Chapter 18: Standards for Linux 747

The C Programming Language 748

Interfaces and the Linux Standards Base 751

The Filesystem Hierarchy Standard 755

Further Reading about Standards 758

Summary 759

Index 761

Printer-Ready Version   Share This
With you wherever you go: pdf + ePub + kindle -- DRM-free