Advanced Linux Programming

Páginas: 321 (80064 palabras) Publicado: 10 de marzo de 2013
Contents At a Glance
I Advanced UNIX Programming with Linux

Advanced Linux Programming

1 Getting Started

3

2 Writing Good GNU/Linux Software 17 3 Processes 45 4 Threads 61 5 Interprocess Communication 95 II Mastering Linux 6 Devices 129 7 The /proc File System 147

8 Linux System Calls 167 9 Inline Assembly Code 189 10 Security 197 11 A Sample GNU/Linux Application 219 IIIAppendixes A Other Development Tools 259 B Low-Level I/O 281 C Table of Signals 301 D Online Resources 303 E Open Publication License Version 1.0 305 F GNU General Public License 309

Advanced Linux Programming
Mark Mitchell, Jeffrey Oldham, and Alex Samuel

www.newriders.com 201 West 103rd Street, Indianapolis, Indiana 46290 An Imprint of Pearson Education Boston • Indianapolis • London • Munich• New York • San Francisco

Advanced Linux Programming
Copyright © 2001 by New Riders Publishing FIRST EDITION: June, 2001 All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without written permission from the publisher, exceptfor the inclusion of brief quotations in a review. International Standard Book Number: 0-7357-1043-0 Library of Congress Catalog Card Number: 00-105343 05 04 03 02 01 7 6 5 4 3 2 1 Interpretation of the printing code:The rightmost doubledigit number is the year of the book’s printing; the rightmost single-digit number is the number of the book’s printing. For example, the printing code 01-1 showsthat the first printing of the book occurred in 2001. Composed in Bembo and MCPdigital by New Riders Publishing. Printed in the United States of America.

Publisher David Dwyer Associate Publisher Al Valvano Executive Editor Stephanie Wall Managing Editor Gina Brown Acquisitions Editor Ann Quinn Development Editor Laura Loveall Product Marketing Manager Stephanie Layton Publicity Manager SusanPetro Project Editor Caroline Wise Copy Editor Krista Hansing Senior Indexer Cheryl Lenser Manufacturing Coordinator Jim Conway Book Designer Louisa Klucznik Cover Designer Brainstorm Design, Inc. Cover Production Aren Howell Proofreader Debra Neel Composition Amy Parker

Trademarks
All terms mentioned in this book that are known to be trademarks or service marks have been appropriatelycapitalized. New Riders Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. PostScript is a trademark of Adobe Systems, Inc. Linux is a trademark of Linus Torvalds.

Warning and Disclaimer
This book is designed to provide information about Advanced Linux Programming. Every efforthas been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information is provided on an as-is basis.The authors and New Riders Publishing shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or from the use of the discs or programs thatmay accompany it.

Table of Contents
I Advanced UNIX Programming with Linux 1
1 Getting Started 3
1.1 Editing with Emacs 4 1.2 Compiling with GCC 6 1.3 Automating the Process with GNU Make 9 1.4 Debugging with GNU Debugger (GDB) 11 1.5 Finding More Information 13

2 Writing Good GNU/Linux Software 17
2.1 Interaction With the Execution Environment 17 2.2 Coding Defensively 30 2.3Writing and Using Libraries 36

3 Processes
3.1 3.2 3.3 3.4

45

Looking at Processes 45 Creating Processes 48 Signals 52 Process Termination 55

4 Threads
4.1 4.2 4.3 4.4 4.5 4.6

61

Thread Creation 62 Thread Cancellation 69 Thread-Specific Data 72 Synchronization and Critical Sections 77 GNU/Linux Thread Implementation 92 Processes Vs.Threads 94

Contents

vii

5 Interprocess...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Advanced python programming (slides)
  • advanced
  • Advance
  • Advanced
  • Xtream Programming
  • Computer Programming
  • Lean Programming
  • Extreme Programming

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS