Home > Store

Solaris Systems Programming (paperback)

Register your product to gain access to bonus material or receive a coupon.

Solaris Systems Programming (paperback)

  • By
  • Published Aug 19, 2004 by Pearson.

Book

  • Sorry, this book is no longer in print.
Not for Sale

About

Features

In the tradition of Stevens' Advanced Programming in the UNIX Environment, programming advice and a thorough reference for Solaris.

° The first significant programming book aimed specifically at the Solaris operating environment

° Real-world case studies, poignant examples, and illustrative diagrams rolled up into a comprehensive text

° Covers all versions of Solaris, from Solaris 2.5 through Solaris 9

Description

  • Copyright 2005
  • Dimensions: 8" x 10"
  • Pages: 1248
  • Edition: 1st
  • Book
  • ISBN-10: 0-7686-8223-1
  • ISBN-13: 978-0-7686-8223-6

This book is one that any Solaris systems programmer will want on their shelf. Sun Microsystems' Solaris Operating Environment boasts a significant installed base, but the intricacies of programming in this UNIX environment have been previously unaddressed in book format. In this thorough new book, the author provides context that allows the reader to better understand the subtleties of the Solaris Operating Environment. He explains not only the "how's" but also the "why's" of Solaris programming, complete with a brief history of the operating system. The result is a comprehensive text that Solaris practitioners will refer to time and again as they face and overcome the significant challenges of their everyday work.

Sample Content

Table of Contents

List of Programs.

List of Figures.

Preface.

PART I. INTRODUCTION.

1. Introduction.

Introduction.

Logging In.

Shells.

Files, Directories, and File Systems.

Input and Output.

Programs, Processes, and Threads.

Error Handling.

User Identification.

Signals.

UNIX Time Values.

System Calls and Library Functions.

Introduction to 64-Bit Programming.

Writing 64-Bit Clean Programs.

Compiling and Installing 64-Bit Programs.

The Large File Compilation Environment.

The Transitional Large File Compilation Environment.

Summary.

2. Chapter Title?

Introduction.

The Early Days: SunOS.

Beyond SunOS: Solaris.

Standards.

ANSI/ISO/IEC C.

System V Interface Definition.

IEEE POSIX.

The Open Group’s XPG4.

The Single UNIX Specification.

Solaris 2.5.

Solaris 2.5.1 

Solaris 2.6.

Solaris 7.

Solaris 8.

Solaris 9.

Solaris Standards Compliance.

Compiling Standards Conforming Applications.

Summary.

PART II. FUNDAMENTAL TOPICS.

3. Utility Functions.

Introduction.

Manipulating Character Classes.

Testing Character Class Membership.

Changing Character Class Membership.

Summary of Character Classes.

Manipulating Character Strings.

Finding the Length of a String.

Comparing Strings.

String Concatenation.

Copying Strings.

String Searching Functions.

Duplicating Strings.

Splitting a String into Tokens.

Functions for Transforming Strings.

Converting Strings to Numbers.

Converting Numbers to Strings.

Manipulating Byte Arrays.

Comparing Byte Arrays.

Copying Byte Arrays.

Searching Byte Arrays.

Initializing Byte Arrays.

Dynamic Memory.

Memory Alignment.

Allocating Dynamic Memory.

Freeing Dynamic Memory.

Other Memory Management Packages.

The malloc Library.

The bsdmalloc Library.

The mapmalloc Library.

The watchmalloc Shared Object.

Comparing the malloc Libraries.

Temporary Files.

Generating Temporary Filenames.

Creating Temporary Files.

Parsing Command Line Arguments.

Error Repor ting.

Suspending a Process.

Summary.

4. Basic File I/O.

Introduction.

File Descriptors.

The open Function.

The creat Function.

The close and closefrom Functions.

The lseek and llseek Functions.

The tell Function.

The read and pread Functions.

The write and pwrite Functions.

The readn and writen Functions.

I/O Efficiency.

File Sharing.

Atomic Operations.

The dup and dup2 Functions.

The fcntl Function.

The ioctl Function.

The fdwalk Function.

Direct I/O.

The /dev/fd File System.

Summary.

5. The Standard I/O Library.

Introduction.

File Streams, Data Types, and Constants.

Standard Input, Standard Output, and Standard Error.

Opening a File Stream.

Closing a File Stream.

Reading and Writing.

Character Input Functions.

Character Output Functions.

Line Input Functions.

Line Output Functions.

Binary I/O.

Stream Status.

For matted I/O.

Formatted Output.

Formatted Input.

For mat Conversion Specifications.

C Language Escape Sequences.

Positioning a Stream.

File Stream Locking.

Unlocked File Stream I/O.

Buffering.

Standard I/O Efficiency.

Summary.

6. Date and Time Operations.

Introduction.

The Complexities of Converting Time.

Getting the Current Time.

The difftime Function.

Setting the Current Time.

Getting the Current Time Zone.

Converting between UNIX Time and Calendar Time.

The localtime and localtime_r Functions.

The gmtime and gmtime_r Functions.

The mktime Function.

For matted Date I/O.

Converting a Date to a For matted String.

Converting a For matted String to a Date.

Summary.

7. Users and Groups.

Introduction.

User Names.

User IDs.

Group IDs.

Group Membership.

The Password File.

The Shadow Password File.

Reading and Encrypting Passwords.

The Group File.

The utmpx and wtmpx Files.

The utmp and wtmp Files.

The lastlog File.

The shells File.

Summary.

8. System Information and Resource Limits.

Introduction.

System Information and Identification.

System Resource Limits.

Per-Process Resource Limits.

The Resource Control Facility.

Resource Control Examples.

Resource Usage Information.

Determining Resource Usage Using the /proc File System.

Determining the System’s Load Average.

Summary.

9. Secure C Programming.

Introduction.

Buffer Overflows.

The Program’s Environment.

Defensive Programming.

The Principle of Least Privilege.

Using chroot Jails.

Tips For Writing Secure Programs.

Summary.

PART III. INPUT/OUTPUT.

10. Files and Directories.

Introduction.

Pathname Components.

The stat , fstat , and lstat Functions.

File Types.

Set-User-ID and Set-Group-ID.

The Sticky Bit.

File Access Permissions.

The access Function.

The umask Function.

The chmod and fchmod Functions.

The chown , fchown , and lchown Functions.

File Size.

File Truncation.

File Systems.

The link and unlink Functions.

The remove and rename Functions.

Symbolic Links.

Resolving Paths that Might Contain Symbolic Links.

The symlink and readlink Functions.

File Times.

Changing a File’s Access and Modification Times.

Creating and Removing Directories.

Reading Directories.

The chdir , fchdir , and getcwd Functions.

The chroot and fchroot Functions.

Special Files.

The sync and fsync Functions.

Putting It All Together.

Summary.

11. Working with File Systems.

Introduction.

Disk Terminology.

The Mounted File System Table.

The mntfs File System ioctl commands.

File System Defaults.

Mounting and Unmounting File Systems.

Obtaining the Status of a File System.

Reading File System Data Structures.

Summary.

12. Terminal I/O.

Introduction.

Overview of Terminal I/O.

Special Input Characters.

Getting and Setting Terminal Attributes.

Terminal Option Flags.

Baud Rate Functions.

Line Control Functions.

Terminal Identification.

Canonical Mode.

Non-Canonical Mode.

Terminal Window Size.

Device-Independent Terminal Control.

Summary.

13. Advanced I/O.

Introduction.

Nonblocking I/O.

Record Locking.

Record Locking Using fcntl.

Record Locking Using lockf.

Deadlock and Livelock.

Lock Inheritance and Release.

Mandatory Versus Advisory Locking.

The STREAMS I/O Subsystem.

STREAMS Messages.

The putmsg and putpmsg Functions.

The getmsg and getpmsg Functions.

STREAMS ioctl Operations.

STREAMS I/O Using read and write.

I/O Multiplexing.

The select Function.

The poll Function.

The /dev/poll Device Driver.

Asynchronous I/O.

Asynchronous I/O With STREAMS Device Files.

Asynchronous I/O With Other Files.

The readv and writev Functions.

The sendfile and sendfilev Functions.

Memory Mapped I/O.

The mmap and munmap Functions.

The mprotect Function.

The madvise Function.

The msync Function.

Locking Pages in Memory.

The memcntl Function.

Summary of Memory Mapped I/O.

Access Control Lists.

The acl and facl Functions.

The aclfromtext and acltotext Functions.

The aclcheck Function.

The aclfrommode and acltomode Functions.

The aclsort Function.

Extended File Attributes.

The openat and attropen Functions.

The fstatat Function.

The unlinkat Function.

The renameat Function.

The fchownat Function.

The futimesat Function.

Changing Extended Attribute File Permissions.

Summary.

PART IV. PROCESSES AND PROCESS CONTROL.

14. The Environment of a UNIX Process.

Introduction.

Process Star t-Up.

Process Termination.

Command Line Arguments.

Environment Variables.

The Memory Layout of a C Program.

Shared Objects.

Memory Allocation.

The setjmp and longjmp Functions.

Resource Limits.

Summary.

15. Process Control.

Introduction.

Process Identifiers.

The fork and fork1 Functions.

The vfork Function.

The exit and _exit Functions.

The wait Function.

The waitpid Function.

The wait3 and wait4 Functions.

The waitid Function.

Race Conditions.

The exec Functions.

Interpreter Files.

The system Function.

Process Accounting.

Summary.

16. Process Relationships.

Introduction.

Terminal Logins.

Network Logins.

Process Groups.

Sessions.

Controlling Terminal.

The tcgetpgrp and tcsetpgrp Functions.

The tcgetsid Function.

Job Control.

Shell Execution of Programs.

Orphaned Process Groups.

Summary.

17. Signals.

Introduction.

Signal Concepts.

The signal Function.

Unreliable Signals.

Reliable Signals.

The sigset Function.

The pause Function.

The sighold , sigrelse , sigignore , and sigpause Functions.

Interrupted System Calls.

Reentrant Functions

Comparing the SIGCHLD and SIGCLD Signals.

The kill , killpg , raise , sigsend , and sigsendset Functions.

The alarm Function.

Interval Timers.

POSIX Signals.

Signal Sets.

The sigprocmask Function.

The sigpending Function.

The sigaction Function.

The sigfpe Function.

The sigsetjmp and siglongjmp Functions.

The sigsuspend Function.

The sigwait Function.

The abort Function.

The system Function Revisited.

The sleep Function Revisited.

Job Control Signals.

Software Signals.

Alternate Signal Stacks.

System Signal Messages.

The sig2str and str2sig Functions.

Summary.

18. Daemon Processes.

Introduction.

Characteristics of Daemons.

Error Logging.

The STREAMS log Driver.

The syslog Facility.

Becoming a Daemon.

Starting Only One Copy of a Daemon.

Summary.

PART V. INTERPROCESS COMMUNICATION.

19. Interprocess Communication Using Pipes and FIFOs.

Introduction.

Pipes.

The popen and pclose Functions.

Coprocesses.

FIFOs.

Iterative Versus Concurrent Servers.

Summary.

20. The System V Interprocess Communication Facility.

Introduction.

System V IPC Concepts.

System V Message Queues.

System V Semaphores Sets.

System V Shared Memory.

Performance Comparisons.

Summary.

21. Advanced Interprocess Communication.

Introduction.

Passing File Descriptors.

An Open Server, Version 1.

Client-Server Connection Functions.

An Open Server, Version 2.

Summary.

22. Doors.

Introduction.

Basic Door Functions.

Door Information Functions.

Advanced Door Facilities.

Premature Termination of a Door Client or Server.

Summary.

PART VI. PSEUDO TERMINALS.

23. Pseudo Terminals.

Introduction.

Overview.

Opening a Pseudo Terminal Device.

The pty_fork Function.

The pty Program.

Using the pty Program.

Advanced Features.

Summary.

Appendix A. An Internationalization and Localization Primer.

Introduction.

Locales.

The setlocale Function.

Message Catalogues.

Creating a Message Catalogue.

The bindtextdomain Function.

The gettext , dgettext , and dcgettext Functions.

The textdomain Function.

The strcoll and strxfrm Functions.

Checklist for Writing Internationalized Programs.

Summary.

Appendix B. The BSD Source Compatibility Package.

Introduction.

Functions That Have Been Removed from the SCP.

Obsolescent SCP-Originated Functions.

SCP-Originated Functions That Are Not Obsolescent.

Summary.

Appendix C. Function Summary.

Introduction.

Function Prototypes.

Function Availability.

Appendix D. Miscellaneous Source Code.

Our Header File, ssp.h.

Standard Error Functions.

File Status Flags Functions.

Section Locking Function.

Our readn and writen Functions.

Ter mination Status Function.

Our Version of snprintf.

Appendix E. Solutions to Selected Exercises.

Bibliography.

Index.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020