×

Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

Beginning Linux Programming / Edition 4
     

Beginning Linux Programming / Edition 4

3.0 1
by Neil Matthew, Richard Stones
 

See All Formats & Editions

ISBN-10: 0470147628

ISBN-13: 9780470147627

Pub. Date: 11/12/2007

Publisher: Wiley

Beginning Linux Programming, Fourth Edition continues its unique approach to teaching UNIX programming in a simple and structured way on the Linux platform. Through the use of detailed and realistic examples, students learn by doing, and are able to move from being a Linux beginner to creating custom applications in Linux. The book introduces fundamental

Overview

Beginning Linux Programming, Fourth Edition continues its unique approach to teaching UNIX programming in a simple and structured way on the Linux platform. Through the use of detailed and realistic examples, students learn by doing, and are able to move from being a Linux beginner to creating custom applications in Linux. The book introduces fundamental concepts beginning with the basics of writing Unix programs in C, and including material on basic system calls, file I/O, interprocess communication (for getting programs to work together), and shell programming. Parallel to this, the book introduces the toolkits and libraries for working with user interfaces, from simpler terminal mode applications to X and GTK+ for graphical user interfaces. Advanced topics are covered in detail such as processes, pipes, semaphores, socket programming, using MySQL, writing applications for the GNOME or the KDE desktop, writing device drivers, POSIX Threads, and kernel programming for the latest Linux Kernel.

Product Details

ISBN-13:
9780470147627
Publisher:
Wiley
Publication date:
11/12/2007
Pages:
816
Sales rank:
348,491
Product dimensions:
7.10(w) x 9.10(h) x 1.80(d)

Table of Contents

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

Customer Reviews

Average Review:

Post to your social network

     

Most Helpful Customer Reviews

See all customer reviews

Beginning Linux Programming 3 out of 5 based on 0 ratings. 1 reviews.
Anonymous More than 1 year ago