In Books
  • All Departments
  • In Books
  • In Bargain Books
  • In eReading
  • In Kids' Books
  • In Teens' Books
  • In Toys & Games
  • In Video Games
  • In Lifestyle & Paper
  • In Movies & TV
  • In Music
  • In Used & Rare Books
  • In Used & Rare Movies & TV
  • In Used & Rare Music
Linux Application Development

Linux Application Development

by Michael K. Johnson

Pearson Education Canada | April 20, 1998 | Hardcover

We wrote this book for experienced (or notsoexperienced, but eagertolearn) programmers who want to develop Linux software or to port software from other platforms to Linux. This is the book we wish we had when we were learning to program for Linux, and the book we now keep on our desks for reference. By the time we wrote our first three chapters, we were already using the drafts as reference material while we worked.

Linux is designed to be similar to Unix. This book gives you a good background in Unix programming basics and style. Linux is not fundamentally different from Unixonly different enough to repeatedly trip up a programmer who relies only on a Unix programming reference that ignores Linux. This book, therefore, is very much a Unix programming guide that is written from a Linux viewpoint.

Linux also has unique extensions, such as its direct screen access capabilities (see Chapter 20), and it has features that are used more often on it than on other systems, such as the SLang library (see Chapter 22). This book covers many of those extensions and features so that you can write programs that truly take advantage of Linux.

  • If you are a C programmer, but you know neither Unix nor Linux, reading this book covertocover and working with the examples should put you well on the road to being a competent Linux programmer. With the aid of other, systemspecific documentation, you should find the transition to any version of Unix easy.
  • If you are already a proficient Unix programmer, you will find that this book makes your transition to Linux easier. We have tried very hard to make it easy for you to find precisely the information you need to know. We also carefully and clearly cover topics that sometimes trip up even experienced Unix programmers, such as process and session groups, job control, and tty handling.
  • If you are already a Linux programmer, this book covers confusing topics clearly and will make many of your programming tasks easier. Nearly every chapter will stand alone for you, because you already possess the minimal knowledge of Linux on which they are based. No matter how experienced you are, you will find material here that you will appreciate having at your elbow.
This book is different from usual Unix programming texts because it is unabashedly specific to a particular operating system. We have no need to confuse newcomers by saying BSD does this this way, SVR4 does it another, HPUX has its own way of handling it, and SGI also has its way. We'll cover each of these and let you sort it all out. We know from our own experience that once you learn how to program well for any Unixlike system, the others are easy to learn.

This book does not cover all the details of Linux programming. For example, it does not cover programming the X Window System, because such programming is the same on any Linux or Unix platform. Similarly, it does not explain the basic interface specified by ANSI Cother books do that quite well. Without extraordinary verbosity, we cover the information you need to know to go from being a C programmer for another system, such as DOS, Windows, or Macintosh, to being a C programmer for Linux. We do not cover the wealth of other programming languages available for Linux, and we do not cover the graphical programming libraries that are identical no matter what supported system you are using. Instead, we point you to books that specialize in those areas.

Linux Application Development is written in four parts.

  • The first part introduces you to Linuxthe operating system, license terms, documentation, and milieu.
  • The second part covers the most important facets of the development environmentthe compilers, linker and loader, and some debugging tools that are not widely used on other platforms.
  • The third part is the heart of the bookit describes the interface to the kernel and to the system libraries, which are primarily meant as an interface to the kernel. Only the final three chapters of this section are very Linuxspecific; most of this section covers general Unix programming from a Linux perspective.
  • The fourth part rounds out your knowledgeit includes descriptions of some important libraries that provide interfaces that are more independent of the kernel. These libraries are, properly speaking, not Linuxspecific, but several are used more often on Linux systems than on other systems.
If you are already familiar with Linux or Unix programming, you will be able to read the chapters in this book in any order. Do not feel compelled to read chapters that do not interest you. If you are not familiar with either Linux or Unix, most of the chapters will stand alone, but you will probably want to read Chapters 1, 2, 4, 5, 8, 9, 10, and 11 first, as they will give you most of what you need to know to read the other chapters. In particular, Chapters 9, 10, and 11 form the core of the Unix and Linux programming model.

The following books, although they may overlap a little here and there, mostly complement this book by being simpler, more advanced, or on related topics.

  • The C Programming Language, second edition Kernighan, 1998 concisely teaches ANSI standard C programming, with scant reference to the operating system. It recommends that readers have either some programming knowledge or ''access to a more knowledgeable colleague.''
  • Practical C Programming Oualline, 1993 teaches C programming and style in a stepbystep, easytofollow manner that is designed for people with no prior programming experience.
  • Programming with GNU Software Loukides, 1997 is an introduction to the GNU programming environment, including chapters on running the C compiler, the debugger, the make utility, and the RCS source code control system.
  • Advanced Programming in the UNIX Environment Stevens, 1992 covers most important Unix and Unixlike systems, although it predates Linux. It covers similar material to the final two parts of Linux Application Development: system calls and shared libraries. It also provides many examples and explains the difference between various Unix versions.
  • UNIX Network Programming Stevens, 1990 thoroughly covers network programming, including legacy types of networking that are not available on Linux, at least as we write this. While reading this book, stick to the Berkeley socket interface (see Chapter 16) to maintain maximum portability. This book may be useful if you need to make a few slight changes to port your Linux network program to some brand of Unix.
See the bibliography on page 513 or at biblio.html for an extensive list of related titles.

All the source code in this book comes from working examples that we have tested while writing. All of the source code in this book is available in electronic format at src/ and ftp://ftp.awl.com/cseng/books/lad/src/. In the interest of clarity, some short source code segments check only for likely errors that document how the system works rather than check for all possible errors. However, in the full programs in the book and on our Web and FTP sites, we have made an attempt (we are not perfect) to check for all reasonable errors.

This book will teach you which functions to use and how they fit together; we encourage you to learn also how to use the reference documentation (Chapter 3 discusses how to find information on Linuxrelated topics), the great majority of which was included with your system.

We welcome your comments sent to ladcomments@awl.com We will read your comments, although we cannot promise to respond to them individually.

Linux is a rapidly developing operating system, and by the time you read this book, some facts (though we hope little substance) will no doubt have changed. We wrote this book in reference to Linux 2.0.30 and the C library version 5.3.12 as distributed with Red Hat Software's Red Hat Linux 4.2. We have also tested our example source code with the C library version 6 (glibc 2.0.5) as distributed with Red Hat Linux 5.0.

With your help, we will maintain a list of errata and changes on the World Wide Web at errata.html and via FTP at ftp://ftp.awl.com/cseng/books/lad/errata/.

We would like to thank each of our technical reviewers for their time and careful thought. Their suggestions have made this book stronger. Particular thanks go to Linus Torvalds, Alan Cox, and Ted Ts'o, who took time to answer our questions.

Special thanks go out to Kim Johnson and Brigid Nogueira. Without their undying patience this book simply would not have been written.

Copyright © 1998 by Addison Wesley Longman, Inc.

0201308215P04062001

$71.95
$68.35

On re-order. Check back soon.

  • Eligible for FREE Shipping on orders over $25. + Details.

Details

From Our Editors

 

If you already have Linux installed, are comfortable with it and have some knowledge of programming, Professional Linux Programming will show you how to delve deeper into it, with comprehensive steps on programming databases, next-generation GUIs and controlling devices. As a wide and rapidly developing area, Linux programming covers many topics including device drivers, kernel programming, application development, realtime systems and clustering. In this volume, authors Richard Stones and Neil Matthew provide the next step in further Linux comprehension, removing the mystery from advanced Linux tools and APIs.

 

 

 

.

From the Publisher

We wrote this book for experienced (or notsoexperienced, but eagertolearn) programmers who want to develop Linux software or to port software from other platforms to Linux. This is the book we wish we had when we were learning to program for Linux, and the book we now keep on our desks for reference. By the time we wrote our first three chapters, we were already using the drafts as reference material while we worked.

Linux is designed to be similar to Unix. This book gives you a good background in Unix programming basics and style. Linux is not fundamentally different from Unixonly different enough to repeatedly trip up a programmer who relies only on a Unix programming reference that ignores Linux. This book, therefore, is very much a Unix programming guide that is written from a Linux viewpoint.

Linux also has unique extensions, such as its direct screen access capabilities (see Chapter 20), and it has features that are used more often on it than on other systems, such as the SLang library (see Chapter 22). This book covers many of those extensions and features so that you can write programs that truly take advantage of Linux.

  • If you are a C programmer, but you know neither Unix nor Linux, reading this book covertocover and working with the examples should put you well on the road to being a competent Linux programmer. With the aid of other, systemspecific documentation, you should find the transition to any version of Unix easy.
  • If you are already a proficient Unix programmer, you will find that this book makes your transition to Linux easier. We have tried very hard to make it easy for you to find precisely the information you need to know. We also carefully and clearly cover topics that sometimes trip up even experienced Unix programmers, such as process and session groups, job control, and tty handling.
  • If you are already a Linux programmer, this book covers confusing topics clearly and will make many of your programming tasks easier. Nearly every chapter will stand alone for you, because you already possess the minimal knowledge of Linux on which they are based. No matter how experienced you are, you will find material here that you will appreciate having at your elbow.
This book is different from usual Unix programming texts because it is unabashedly specific to a particular operating system. We have no need to confuse newcomers by saying BSD does this this way, SVR4 does it another, HPUX has its own way of handling it, and SGI also has its way. We'll cover each of these and let you sort it all out. We know from our own experience that once you learn how to program well for any Unixlike system, the others are easy to learn.

This book does not cover all the details of Linux programming. For example, it does not cover programming the X Window System, because such programming is the same on any Linux or Unix platform. Similarly, it does not explain the basic interface specified by ANSI Cother books do that quite well. Without extraordinary verbosity, we cover the information you need to know to go from being a C programmer for another system, such as DOS, Windows, or Macintosh, to being a C programmer for Linux. We do not cover the wealth of other programming languages available for Linux, and we do not cover the graphical programming libraries that are identical no matter what supported system you are using. Instead, we point you to books that specialize in those areas.

Linux Application Development is written in four parts.

  • The first part introduces you to Linuxthe operating system, license terms, documentation, and milieu.
  • The second part covers the most important facets of the development environmentthe compilers, linker and loader, and some debugging tools that are not widely used on other platforms.
  • The third part is the heart of the bookit describes the interface to the kernel and to the system libraries, which are primarily meant as an interface to the kernel. Only the final three chapters of this section are very Linuxspecific; most of this section covers general Unix programming from a Linux perspective.
  • The fourth part rounds out your knowledgeit includes descriptions of some important libraries that provide interfaces that are more independent of the kernel. These libraries are, properly speaking, not Linuxspecific, but several are used more often on Linux systems than on other systems.
If you are already familiar with Linux or Unix programming, you will be able to read the chapters in this book in any order. Do not feel compelled to read chapters that do not interest you. If you are not familiar with either Linux or Unix, most of the chapters will stand alone, but you will probably want to read Chapters 1, 2, 4, 5, 8, 9, 10, and 11 first, as they will give you most of what you need to know to read the other chapters. In particular, Chapters 9, 10, and 11 form the core of the Unix and Linux programming model.

The following books, although they may overlap a little here and there, mostly complement this book by being simpler, more advanced, or on related topics.

  • The C Programming Language, second edition Kernighan, 1998 concisely teaches ANSI standard C programming, with scant reference to the operating system. It recommends that readers have either some programming knowledge or ''access to a more knowledgeable colleague.''
  • Practical C Programming Oualline, 1993 teaches C programming and style in a stepbystep, easytofollow manner that is designed for people with no prior programming experience.
  • Programming with GNU Software Loukides, 1997 is an introduction to the GNU programming environment, including chapters on running the C compiler, the debugger, the make utility, and the RCS source code control system.
  • Advanced Programming in the UNIX Environment Stevens, 1992 covers most important Unix and Unixlike systems, although it predates Linux. It covers similar material to the final two parts of Linux Application Development: system calls and shared libraries. It also provides many examples and explains the difference between various Unix versions.
  • UNIX Network Programming Stevens, 1990 thoroughly covers network programming, including legacy types of networking that are not available on Linux, at least as we write this. While reading this book, stick to the Berkeley socket interface (see Chapter 16) to maintain maximum portability. This book may be useful if you need to make a few slight changes to port your Linux network program to some brand of Unix.
See the bibliography on page 513 or at biblio.html for an extensive list of related titles.

All the source code in this book comes from working examples that we have tested while writing. All of the source code in this book is available in electronic format at src/ and ftp://ftp.awl.com/cseng/books/lad/src/. In the interest of clarity, some short source code segments check only for likely errors that document how the system works rather than check for all possible errors. However, in the full programs in the book and on our Web and FTP sites, we have made an attempt (we are not perfect) to check for all reasonable errors.

This book will teach you which functions to use and how they fit together; we encourage you to learn also how to use the reference documentation (Chapter 3 discusses how to find information on Linuxrelated topics), the great majority of which was included with your system.

We welcome your comments sent to ladcomments@awl.com We will read your comments, although we cannot promise to respond to them individually.

Linux is a rapidly developing operating system, and by the time you read this book, some facts (though we hope little substance) will no doubt have changed. We wrote this book in reference to Linux 2.0.30 and the C library version 5.3.12 as distributed with Red Hat Software's Red Hat Linux 4.2. We have also tested our example source code with the C library version 6 (glibc 2.0.5) as distributed with Red Hat Linux 5.0.

With your help, we will maintain a list of errata and changes on the World Wide Web at errata.html and via FTP at ftp://ftp.awl.com/cseng/books/lad/errata/.

We would like to thank each of our technical reviewers for their time and careful thought. Their suggestions have made this book stronger. Particular thanks go to Linus Torvalds, Alan Cox, and Ted Ts'o, who took time to answer our questions.

Special thanks go out to Kim Johnson and Brigid Nogueira. Without their undying patience this book simply would not have been written.

Copyright © 1998 by Addison Wesley Longman, Inc.

0201308215P04062001

From the Jacket

This practical reference guides programmers developing Linux applications or porting applications from other platforms. Linux is fundamentally similar to Unixoso, much of the book covers ground familiar to Unix programmersobut this book consistently addresses topics from a Linux point of view. The aim throughout is to provide the detailed information you need to take full advantage of Linux.

If you are already a proficient Unix programmer, this book will greatly facilitate your transition to Linux. You will also find helpful discussions of some tricky Unix topics, such as process and session groups, job control, and tty handling.

If you are a C programmer, but know neither Unix nor Linux, reading this book in its entirety and working with its numerous examples will give you a solid introduction to Linux programming.

If you are already a Linux programmer, this bookis clear treatment of advanced and otherwise confusing topics will surely make your programming tasks easier.

Linux Application Development is divided into four parts. Part 1 introduces you to Linuxothe operating system, licenses, and documentation. Part 2 covers the most important aspects of the development environmentothe compilers, linker, loader, and debugging tools. Part 3othe heart of the bookodescribes the interface to the kernel and to the core system libraries, including discussion of the process model, file handling, directory operations, signal processing (including the Linux signal API), job control, the POSIX!= termios interface, sockets, and the Linux console. Part 4 describes important development libraries with interfaces more independent of the kernel.

0201308215B04062001

About the Author

Michael K. Johnson is a developer for Red Hat Software, a leading provider of Linux software. Previously, Michael was the editor of the Linux Journal, and helped found the Linux Documentation Project. A Linux developer since its original release, he has written or contributed to several standard Linux system components and now develops system software and configuration tools for Red Hat LinuxTM. Together with Erik Troan, he is responsible for the key Linux ftp archives.

Erik W. Troan is a developer for Red Hat Software, a leading provider of Linux software. He is Chief Developer at Red Hat Software and has made significant contributions to Red Hat LinuxTM for the Intel, Alpha, and SPARC platforms. He is a primary author of the RPMTM packaging tool, as well as many other Linux applications. He has been a regular columnist for the X Journal magazine. Together with Michael Johnson, he is responsible for the key Linux ftp archives.



From the Author

We wrote this book for experienced (or notsoexperienced, but eagertolearn) programmers who want to develop Linux software or to port software from other platforms to Linux. This is the book we wish we had when we were learning to program for Linux, and the book we now keep on our desks for reference. By the time we wrote our first three chapters, we were already using the drafts as reference material while we worked.

Linux is designed to be similar to Unix. This book gives you a good background in Unix programming basics and style. Linux is not fundamentally different from Unixonly different enough to repeatedly trip up a programmer who relies only on a Unix programming reference that ignores Linux. This book, therefore, is very much a Unix programming guide that is written from a Linux viewpoint.

Linux also has unique extensions, such as its direct screen access capabilities (see Chapter 20), and it has features that are used more often on it than on other systems, such as the SLang library (see Chapter 22). This book covers many of those extensions and features so that you can write programs that truly take advantage of Linux.

  • If you are a C programmer, but you know neither Unix nor Linux, reading this book covertocover and working with the examples should put you well on the road to being a competent Linux programmer. With the aid of other, systemspecific documentation, you should find the transition to any version of Unix easy.
  • If you are already a proficient Unix programmer, you will find that this book makes your transition to Linux easier. We have tried very hard to make it easy for you to find precisely the information you need to know. We also carefully and clearly cover topics that sometimes trip up even experienced Unix programmers, such as process and session groups, job control, and tty handling.
  • If you are already a Linux programmer, this book covers confusing topics clearly and will make many of your programming tasks easier. Nearly every chapter will stand alone for you, because you already possess the minimal knowledge of Linux on which they are based. No matter how experienced you are, you will find material here that you will appreciate having at your elbow.
This book is different from usual Unix programming texts because it is unabashedly specific to a particular operating system. We have no need to confuse newcomers by saying BSD does this this way, SVR4 does it another, HPUX has its own way of handling it, and SGI also has its way. We'll cover each of these and let you sort it all out. We know from our own experience that once you learn how to program well for any Unixlike system, the others are easy to learn.

This book does not cover all the details of Linux programming. For example, it does not cover programming the X Window System, because such programming is the same on any Linux or Unix platform. Similarly, it does not explain the basic interface specified by ANSI Cother books do that quite well. Without extraordinary verbosity, we cover the information you need to know to go from being a C programmer for another system, such as DOS, Windows, or Macintosh, to being a C programmer for Linux. We do not cover the wealth of other programming languages available for Linux, and we do not cover the graphical programming libraries that are identical no matter what supported system you are using. Instead, we point you to books that specialize in those areas.

Linux Application Development is written in four parts.

  • The first part introduces you to Linuxthe operating system, license terms, documentation, and milieu.
  • The second part covers the most important facets of the development environmentthe compilers, linker and loader, and some debugging tools that are not widely used on other platforms.
  • The third part is the heart of the bookit describes the interface to the kernel and to the system libraries, which are primarily meant as an interface to the kernel. Only the final three chapters of this section are very Linuxspecific; most of this section covers general Unix programming from a Linux perspective.
  • The fourth part rounds out your knowledgeit includes descriptions of some important libraries that provide interfaces that are more independent of the kernel. These libraries are, properly speaking, not Linuxspecific, but several are used more often on Linux systems than on other systems.
If you are already familiar with Linux or Unix programming, you will be able to read the chapters in this book in any order. Do not feel compelled to read chapters that do not interest you. If you are not familiar with either Linux or Unix, most of the chapters will stand alone, but you will probably want to read Chapters 1, 2, 4, 5, 8, 9, 10, and 11 first, as they will give you most of what you need to know to read the other chapters. In particular, Chapters 9, 10, and 11 form the core of the Unix and Linux programming model.

The following books, although they may overlap a little here and there, mostly complement this book by being simpler, more advanced, or on related topics.

  • The C Programming Language, second edition Kernighan, 1998 concisely teaches ANSI standard C programming, with scant reference to the operating system. It recommends that readers have either some programming knowledge or ''access to a more knowledgeable colleague.''
  • Practical C Programming Oualline, 1993 teaches C programming and style in a stepbystep, easytofollow manner that is designed for people with no prior programming experience.
  • Programming with GNU Software Loukides, 1997 is an introduction to the GNU programming environment, including chapters on running the C compiler, the debugger, the make utility, and the RCS source code control system.
  • Advanced Programming in the UNIX Environment Stevens, 1992 covers most important Unix and Unixlike systems, although it predates Linux. It covers similar material to the final two parts of Linux Application Development: system calls and shared libraries. It also provides many examples and explains the difference between various Unix versions.
  • UNIX Network Programming Stevens, 1990 thoroughly covers network programming, including legacy types of networking that are not available on Linux, at least as we write this. While reading this book, stick to the Berkeley socket interface (see Chapter 16) to maintain maximum portability. This book may be useful if you need to make a few slight changes to port your Linux network program to some brand of Unix.
See the bibliography on page 513 or at biblio.html for an extensive list of related titles.

All the source code in this book comes from working examples that we have tested while writing. All of the source code in this book is available in electronic format at src/ and ftp://ftp.awl.com/cseng/books/lad/src/. In the interest of clarity, some short source code segments check only for likely errors that document how the system works rather than check for all possible errors. However, in the full programs in the book and on our Web and FTP sites, we have made an attempt (we are not perfect) to check for all reasonable errors.

This book will teach you which functions to use and how they fit together; we encourage you to learn also how to use the reference documentation (Chapter 3 discusses how to find information on Linuxrelated topics), the great majority of which was included with your system.

We welcome your comments sent to ladcomments@awl.com We will read your comments, although we cannot promise to respond to them individually.

Linux is a rapidly developing operating system, and by the time you read this book, some facts (though we hope little substance) will no doubt have changed. We wrote this book in reference to Linux 2.0.30 and the C library version 5.3.12 as distributed with Red Hat Software's Red Hat Linux 4.2. We have also tested our example source code with the C library version 6 (glibc 2.0.5) as distributed with Red Hat Linux 5.0.

With your help, we will maintain a list of errata and changes on the World Wide Web at errata.html and via FTP at ftp://ftp.awl.com/cseng/books/lad/errata/.

We would like to thank each of our technical reviewers for their time and careful thought. Their suggestions have made this book stronger. Particular thanks go to Linus Torvalds, Alan Cox, and Ted Ts'o, who took time to answer our questions.

Special thanks go out to Kim Johnson and Brigid Nogueira. Without their undying patience this book simply would not have been written.

Copyright © 1998 by Addison Wesley Longman, Inc.

0201308215P04062001

Hardcover

7.7 x 9.5 x 1.25 in

April 20, 1998

Pearson Education Canada


0201308215
9780201308211

From Community

< close and return to chapters.indigo.ca
kobo
  • Take your library with you wherever you go
  • Use the device you want to use… smartphone, desktop and many of today’s most popular eReaders
  • Use Indigo gift cards to buy eBooks and subscriptions

WHY KOBO?

We love the Kobo eReading service… and we know you will too. We’ve partnered with them to bring you the most flexible, enjoyable eReading experience in Canada.

SHOPPING ON KOBO

You’ll be asked to sign in or create a new account with Kobo. Once you do, you’ll immediately get access to millions of titles and be ready to start eReading. Anytime. Anyplace.

continue to kobo

Sign up for email

Be the first to know

about discounts, promotions and new releases.

Sign up now 

Self Publish

Get your book published

and on our shelves!

Find out how  

Protected by Copyright. All Rights Reserved. Legal Notices and Terms of Use | Privacy Policy  

Portions of content provided by Rovi Corporation © 2010

Powered by EndecaVeriSign SecuredEssential Accessibility 

As Canada’s purveyor of ideas and inspiration, Indigo is the largest book, gift and specialty toy retailer in Canada. Indigo operates in all provinces under different banners including Indigo Books & Music; Indigo Books, Gifts, Kids; IndigoSpirit; Chapters; The World's Biggest Bookstore; and Coles. The online channel, www.indigo.ca, features books, eBooks, toys and gifts and hosts the award winning Indigo Online Community.

111