Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Google   


Unix System Calls Links

Old News Recommended Books Minitutorial Reference Dubeau. Beej Rusling
Rochkind Burkett et all David Marshall Linux Memory Management Open Group Search Engine Gnu C library Etc

 

Reference

System Calls -- slides

-->

-->

Use pipe

-->

Process Control (cont.)

fork( )

Example:

 

Event Detection (Signal)

Signal (cont.)

Signal (cont.)

setjmp & longjmp (<.h>)

 

#include <.h>

exec () family

dup(int filedesc) duplicates the file descriptor to the lowest unused file descriptor number.

pipe (conti.)

-->

 

 

[Aug 20, 2004] Manipulating Files And Directories In Unix Copyright (c) 1998-2002 by guy keren.

The following tutorial describes various common methods for reading and writing files and directories on a Unix system. Part of the information is common C knowledge, and is repeated here for completeness. Other information is Unix-specific, although DOS programmers will find some of it similar to what they saw in various DOS compilers. If you are a proficient C programmer, and know everything about the standard I/O functions, its buffering operations, and know functions such as fseek() or fread(), you may skip the standard C library I/O functions section. If in doubt, at least skim through this section, to catch up on things you might not be familiar with, and at least look at the standard C library examples.

  • This document is copyright (c) 1998-2002 by guy keren.

    The material in this document is provided AS IS, without any expressed or implied warranty, or claim of fitness for a particular purpose. Neither the author nor any contributers shell be liable for any damages incured directly or indirectly by using the material contained in this document.

    permission to copy this document (electronically or on paper, for personal or organization internal use) or publish it on-line is hereby granted, provided that the document is copied as-is, this copyright notice is preserved, and a link to the original document is written in the document's body, or in the page linking to the copy of this document.

    Permission to make translations of this document is also granted, under these terms - assuming the translation preserves the meaning of the text, the copyright notice is preserved as-is, and a link to the original document is written in the document's body, or in the page linking to the copy of this document.

    For any questions about the document and its license, please contact the author.
  • Advanced Programming in the UNIX(R) Environment

    • Hardcover: 768 pages ; Dimensions (in inches): 2.35 x 9.67 x 7.92
    • Publisher: Addison-Wesley Pub Co; 1st edition (June 1992)
    • ISBN: 0201563177
    • Average Customer Review: 4.7 out of 5 stars Based on 60 reviews. Write a review.
       
    • Amazon.com Sales Rank: 18,569
      (Publishers & Authors: improve your sales)
    A rarity - a great computer book., April 24, 2001
     
    
Top 1000 Reviewer Reviewer: Bowen Simmons (see more about me) from Sunnyvale, CA USA
    The computer industry is notable for the huge quantity of really bad books it engenders. This, however, is not one of those books - this is a great book. Before explaining why it is great, I'd like to get the table of contents out of the way, so that you will know what it covers:

    Preface

    1. Introduction (a "whirlwind tour of Unix")

    2. Unix Standardization and Implementations

    3. File I/O

    4. Files and Directories

    5. Standard I/O Library

    6. System Data Files and Information

    7. The Environment of a Unix Process

    8. Process Control

    9. Process Relationships

    10. Signals

    11. Terminal I/O

    12. Advanced I/O

    13. Daemon Processes

    14. Interprocess Communication

    15. Advanced Interprocess Communication

    16. A Database Library

    17. Communicating with a PostScript Printer

    18. A Modem Dialer

    19. Pseudo Terminals

    Appendices

    A. Function Prototypes

    B. Miscellaneous Source Code (all source code is available for download)

    C. Solutions to Selected Exercises

    Bibliography

    Index

    The first thing to understand about the book is that while it can be used as just a reference work (the index is wonderful), it really is a book you can and should read. Even if you think you know a lot of this stuff, you can be surprised at what you can still learn.

    What makes the book so much more useful than just a collection of man-page print-outs (that dreary and painfully common form of UNIX "book") is the method of presentation. Stevens' basic atom of organization is the function call. For each call (or minor variations on a single call), he provides the C prototype, and then, in text, explains what the function does, what it's arguments are for, and then typically provides a small C program that demonstrates it in action, which he then explains. These function-level building blocks are arranged into related sets, each of which is a chapter in the book. Each chapter has a wrapper that consists of an introduction explaining some basic concepts and history of the functions described in that chapter, and some review exercises at the end. The chapters themselves are arranged so that the earlier chapters describe the basic functions, and the later chapters describe the more difficult functions. Every chapter both teaches the reader something of immediate use in writing code (even the introduction has sample programs), as well as preparing him for the more difficult subjects that lie ahead.

    Now for the caveats. Stevens absolutely assumes that you know how to program in C and that you know how to use Unix development tools (or at least that you have some other source from which to learn them). This is not the book to learn how to use C or particular shells, editors, compilers, linkers, or debuggers. Similarly, new Unix variants, such as Linux and MacOS X, receive no specific mention here at all (though the book is invaluable for both). Also, there is no discussion of the various GUI interfaces offered on many current Unix systems - for those, some other book will necessary.

    One other thing worth mentioning is the cost of the book. Don't be put off by it - Stevens' book has been justifying that cost for a lot of readers for a lot of years.

    In closing, I've been a developer for many years and have owned many computer books. I recommend very few of them, but can't recommend this one highly enough. It is one of the few books I've had that routinely lies open beside me when I work. In addition to my personal recommendation, you might look not only at all the positive reviews for this book, but also at the reviews for "competitive" books and notice how often they refer you back to this one. This book is the standard by which other UNIX programming books are measured, and so far, it has not been surpassed

    Using Unix System Calls by M. Rochkind, W.Toomey

    Programming in C  --    David Marshall 1994 Contains a lot of useful info on system calls 

    BSD Sockets: A Quick & Dirty Primer
     
    ``As you delve into the mysteries of UNIX, you find more and more things that are difficult to understand immediately. One of these things, at least for most people, is the BSD socket concept. This is a short tutorial that explains what they are, how they work, and gives sample code showing how to use them.'' --Jim Frost
     
    UNIX Signals and Process Groups
     
    ``This document describes the four common UNIX signalling environments, including their interfaces, and contrasts each. In addition, it describes the concepts and interfaces behind both BSD and POSIX process groups.'' --Jim Frost
     
    Berkeley UNIX® System Calls and Interprocess Communication
     
    The purpose of this paper is to discuss interprocess communication in the context of Berkeley UNIX. Special emphasis will be given to those system calls concerned with the creation, management, and use of sockets. --Lawrence Besaw

     

    Papers from the 4.4BSD PSD Manual ( Copyright Notice .)
    Introductory 4.4BSD IPC (HTML)
    An Advanced 4.4BSD IPC Tutorial (HTML)
     
    Unix FAQ
    ftp://rtfm.mit.edu/pub/usenet/news.answers/unix-faq/

     

    UNIX Referance Desk
    http://www.geek-girl.com/unix.html

    Unix Seventh Edition Manual This is a classic. See vol1/man2.bun - system calls for historical information that may help to understand Unix kernel evolution.

    Syscall specifications of Linux - Table of Contents by Louis-Dominique Dubeau.

    [Beej's Guide] A fork() primer   -- From Beej's Guide to Unix Interprocess Communication


    [Dubeau] Syscall specifications of Linux - Table of Contents by Louis-Dominique DubSyscall specifications of Linux - Table of Contents by Louis-Dominique Dubeau.

    [Beej's Guide] A fork() primer   -- From Beej's Guide to Unix Interprocess Communication

    UNIX Kernel Source Tour

    Tour of the Linux kernel source

    The Linux Kernel -- free book by David A Rusling. One of the best source of information about Linux kernel


    Berkeley UNIX System Calls and Interprocess Communication


    The Linux Programmer's Guide, version 0.4 by B. Scott Burkett, Sven Goldt, John D. Harper, Sven van der Meer and Matt Welsh, is available in HTML, HTML (tared and gziped), LaTeX source, PDF and PostScript.


    Linux Memory Management


    Open Group Search Engine

    http://www.opengroup.org/onlinepubs/7908799/

     


    GNU C Library

    libc -- GNU C Library - GNU Project - Free Software Foundation (FSF)

    Any Unix-like operating system needs a C library: the library which defines the ``system calls'' and other basic facilities such as malloc.

    The history of Unix and various standards determine much of the interface of the C library. In general the GNU C library supports the ISO C and POSIX standards. We also try to support the features of popular Unix variants (including BSD and System V) when those do not conflict with the standards. Different compatibility modes (selectable when you compile an application) allow the peaceful coexistence of compatibility support for different varieties of Unix.


    Etc

    FreeCode Free Programming Source Code

    Socket Programming Guide

    UNIX Socket Programming in C -- Programming UNIX Sockets in C - Frequently Asked Questions Created by Vic Metcalfe, Andrew Gierth and other contributers May 21, 1998

    W. Richard Stevens home page

    FreeCode

    UKUUG Home Page


    Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

    Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

    Last modified: February 28, 2008