Softpanorama

Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
May the source be with you, but remember the KISS principle ;-)
Bigger doesn't imply better. Bigger often is a sign of obesity, of lost control, of overcomplexity, of cancerous cells

Unix System Calls Links

Old News Recommended Books Minitutorial Reference Dubeau. Beej Rusling
System V IPC The Kernel Buffer Structures Process contol Unix Sockets Memory allocation functions Virtual memory Gnu C library
Rochkind Burkett et all David Marshall Open Group Search Engine Random Findings  Humor Etc

Reference

Linux Syscall Reference

fxr.watson.org sys-kern-syscalls.master

Linux System Call Table

Wikipedia

System call - Wikipedia, the free encyclopedia

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 Dub

    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

    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.



    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.


    Random Findings

    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



    Etc

    Society

    Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

    Quotes

    War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

    Bulletin:

    Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

    History:

    Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

    Classic books:

    The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

    Most popular humor pages:

    Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

    The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D


    Copyright ฉ 1996-2018 by Dr. Nikolai Bezroukov. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) in the author free time and without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

    FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

    This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

    You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info

    Disclaimer:

    The statements, views and opinions presented on this web page are those of the author (or referenced source) 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.

    The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

    Last modified: September 12, 2017