Thank you for visiting us. We are currently updating our shopping cart and regret to advise that it will be unavailable until September 1, 2014. We apologise for any inconvenience and look forward to serving you again.

Wiley
Wiley.com
Print this page Share

Beginning Linux Programming, 3rd Edition

ISBN: 978-0-7645-4497-2
888 pages
January 2004
Beginning Linux Programming, 3rd Edition (0764544977) cover image
What is this book about?

If you have some programming experience and are ready to venture into Linux programming, this updated edition of the bestselling entry-level book takes you there. The authors guide you step by step, using construction of a CD database application to give you hands-on experience as you progress from the basic to the complex. You’ll start with fundamental concepts like writing Unix programs in C. You’ll learn basic system calls, file I/O, interprocess communication, and shell programming. You’ll become skilled with the toolkits and libraries for working with user interfaces.

The book starts from the basics, explaining how to compile and run your first program. New to this edition are chapters on MySQL® access and administration; programming GNOME and KDE; and Linux standards for portable applications. Coverage of kernel programming, device drivers, CVS, grep, and GUI development environments has expanded. This book gives you practical knowledge for real wor ld application.

What does this book cover?

In this book, you will learn how to

  • Develop programs to access files and the Linux environment
  • Use the GNU compiler, debugger and other development tools
  • Program data storage aapplications for MySQL and DBM database systems
  • Write programs that take advantage of signals, processes and threads
  • Build graphical user interfaces using both the GTK (for GNOME) and Qt (for KDE) libraries
  • Write device drivers that can be loaded into the Linux kernel
  • Access the network using TCP/IP sockets
  • Write scripts that use grep, regular expressions and other Linux facilities

Who is this book for?

This book is for programmers with some C or C++ experience, who want to take advantage of the Linux development environment. You should have enough Linux familiarity to have installed and configured users on Linux.

See More
Foreword by Alan Cox.

Introduction.

Chapter 1: Getting Started.

Chapter 2: Shell Programming.

Chapter 3: Working with Files.

Chapter 4: The Linux Environment.

Chapter 5: Terminals.

Chapter 6: Managing Text-Based Screens with curses.

Chapter 7: Data Management.

Chapter 8: MySQL.

Chapter 9: Development Tools.

Chapter 10: Debugging.

Chapter 11: Processes and Signals.

Chapter 12: POSIX Threads.

Chapter 13: Inter-Process Communication: Pipes.

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

Chapter 15: Sockets.

Chapter 16: Programming GNOME Using GTK+.

Chapter 17: Programming KDE Using Qt.

Chapter 18: Device Drivers.

Chapter 19: Standards for Linux.

Index.

See More
Neil Matthew has been interested in and has programmed computers since 1974. Amathematics graduate from the University of Nottingham, Neil is just plain keen on programming languages and likes to explore new ways of solving computing problems. He’s written systems to program in BCPL, FP (Functional Programming), Lisp, Prolog, and a structured BASIC. He even wrote a 6502 microprocessor emulator to run BBC microcomputer programs on UNIX systems.
In terms of UNIX experience, Neil has used almost every flavor since the late 1970s, including BSD UNIX, AT&T System V, Sun Solaris, IBM AIX, many others, and of course Linux.
Neil can claim to have been using Linux since August 1993 when he acquired a floppy disk distribution of Soft Landing (SLS) from Canada, with kernel version 0.99.11. He’s used Linux-based computers for hacking C, C++, Icon, Prolog, Tcl, and Java at home and at work.
Most of Neil’s “home” projects were originally developed using SCO UNIX, but they’ve all ported to Linux with little or no trouble. He says Linux is much easier because it supports quite a lot of features from other systems, so that both BSD- and System V–targeted programs will generally compile with little or no change.
As the head of software and principal engineer at Camtec Electronics in the 1980s, Neil programmed in C and C++ for real-time embedded systems. Since then he’s worked on software development techniques and quality assurance. After a spell as a consultant with Scientific Generics he is currently working as a systems architect with Celesio AG.
Neil is married to Christine and has two children, Alexandra and Adrian. He lives in a converted barn in Northamptonshire, England. His interests include solving puzzles by computer, music, science fiction, squash, mountain biking, and not doing it yourself.

Rick Stones programming at school, more years ago than he cares to remember, on a 6502-powered BBC micro, which with the help of a few spare parts continued to function for the next 15 years. He graduated from Nottingham University with a degree in Electronic Engineering, but decided software was more fun.
Over the years he has worked for a variety of companies, from the very small with just a dozen employees, to the very large, including the IT services giant EDS. Along the way he has worked on a range of projects, from real-time communications to accounting systems, very large help desk systems, and more recently as the technical authority on a large EPoS and retail central systems program.
A bit of a programming linguist, he has programmed in various assemblers, a rather neat proprietary telecommunications language called SL-1, some FORTRAN, Pascal, Perl, SQL, and smidgeons of Python and C++, as well as C. (Under duress he even admits that he was once reasonably proficient in Visual Basic, but tries not to advertise this aberration.)
Rick lives in a village in Leicestershire, England, with his wife Ann, children Jennifer and Andrew, and two cats. Outside work his main interest is classical music, especially early religious music, and he even does his best to find time for some piano practice. He is currently trying to learn to speak German.

See More
What does this book cover?

In this book, students will learn how to

  • Develop programs to access files and the Linux environment
  • Use the GNU compiler, debugger and other development tools
  • Program data storage aapplications for MySQL and DBM database systems
  • Write programs that take advantage of signals, processes and threads
  • Build graphical user interfaces using both the GTK (for GNOME) and Qt (for KDE) libraries
  • Write device drivers that can be loaded into the Linux kernel
  • Access the network using TCP/IP sockets
  • Write scripts that use grep, regular expressions and other Linux facilities

Who is this book for?

This book is for students with some C or C++ experience, who want to take advantage of the Linux development environment.

See More
Download TitleSizeDownload
Download the 544977_code.tgz file into a suitable directory,
then use "tar zxvf 544977_code.tgz" to extract the contents.
133.88 KB Click to Download
Download the Application code for Chapter 8. 4.18 KB Click to Download
See More

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
7 Error in Code
$ cat hello.c
#include <stdio.h>

int main()
{
printf("Hello World\n");
exit(0);
}
$

Should be:

$ cat hello.c
#include <stdio.h>
#include <stdlib.h>

int main()
{
printf("Hello World\n");
exit(0);
}
$
10/11/05
13 Error in text
The .so libraries correspond to .DLL files and are required at run time, while the .sa libraries are similar to .LIB files included in the program exevutable.

Should be:

The .so libraries correspond to .DLL files and are required at run time, while the .a libraries are similar to .LIB files included files included in the program exevutable.
7/19/05
38 Error in Variable
Under "Try It Out --for Loop with Wildcard Expansion":
last sentence in the second paragraph reads:
Each of these in turn is used as the variable $i inside the for loop.

should be:
Each of these in turn is used as the variable $file inside the for loop.
02/10/07
199 Error in sample program
The sample program on page 199 is in error, there should be no "(int *)" on the affected line.
The line: tputs(clear, 1, (int *) char_to_terminal);
should read: tputs(clear, 1, char_to_terminal);
12/1/04
243-244 Error in Try It Out
Try It Out - Querying the CD Database section:
the find_cd method has the following three lines interspersed in the logic:
if (found == strstr(catalog, ",")) {
if (found == strstr(title, ",")) {
if (found == strstr(title, match)) {

In all these lines the comparison operator (==) should be replaced with the assignment operator (=) for the code to work properly.
03/12/07
237 Error in Try It Out
In the Try It Out - The Menu section:
the draw_menu method increments the txt_ptr in the while loop.

This line (txt_ptr++) should be deleted, because it causes the truncation of the first character in every option line when the menu is displayed.
03/12/07
301 Error in Text
In Makefile logic:
access.c and access.o

should be:
cd_access.c and cd_access.o.
04/06/07
313 New Heading
Second paragraph:
requires new heading after first section:
"mysqldump"
8-14-06
See More

Related Titles

Back to Top