Open System Services Programmer's Guide

Contents
About This Document...................................................................................15
About TNS, TNS/R Native, and TNS/E Native Processes............................................................15
About the Examples................................................................................................................15
About OSS Utilities.................................................................................................................16
Supported Release Version Updates (RVUs)................................................................................16
Intended Audience..................................................................................................................16
New and Changed Information................................................................................................16
Changes Made to the 520574-021 Edition (February 2014)....................................................17
Changes Made to the 520574-020 Edition (August 2013).......................................................17
Changes Made to the 520574-019 Edition (February 2013).....................................................17
Changes Made to the 520574-018 Edition (August 2012)........................................................18
Changes Made to the 520574-017 Edition (February 2012).....................................................18
Changes Made to the 520574-016 Edition (August 2011)........................................................19
Document Organization..........................................................................................................20
Notation Conventions..............................................................................................................20
General Syntax Notation....................................................................................................20
Related Information.................................................................................................................22
Publishing History...................................................................................................................24
HP Encourages Your Comments................................................................................................25
1 Overview of the OSS Programming Environment...........................................26
The OSS API..........................................................................................................................27
Standards Conformance.....................................................................................................27
Extensions Based on Standards or Proposed Standards...........................................................28
Two File Systems.....................................................................................................................28
The OSS File System...........................................................................................................28
The Guardian File System....................................................................................................30
Two Process Types..................................................................................................................32
Process Identification..........................................................................................................33
Process Groups..................................................................................................................33
Process Ancestors...............................................................................................................35
Process Attributes...............................................................................................................36
Process Environment...........................................................................................................36
Process Pairs.....................................................................................................................36
Native and TNS Processes..................................................................................................36
Selecting Source and Target Execution Environments...................................................................37
The Typical Case...............................................................................................................37
Special Cases of Cross Compilation.....................................................................................37
Calling Functions and Procedures in OSS Programs.....................................................................37
OSS Functions...................................................................................................................37
Guardian Procedures.........................................................................................................38
Guardian C Functions.........................................................................................................42
Refer to Bits From Left to Right..............................................................................................43
Using the Development Tools....................................................................................................43
Using Tools in Both Environments.........................................................................................43
OSS Tools.........................................................................................................................44
Guardian Tools..................................................................................................................49
Using the NonStop Development Environment for Eclipse.............................................................52
Using the HP Enterprise Toolkit - NonStop Edition........................................................................52
2 Managing Files........................................................................................53
The OSS and Guardian File Systems.........................................................................................53
Contents 3