Open System Services Porting Guide (G06.24+, H06.03+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to Porting
- 2 The Development Environment
- 3 Useful Porting Tools
- 4 Interoperating Between User Environments
- Purpose of Interoperability
- The OSS User Environment
- OSS Commands for the Guardian User
- Guardian Commands for the UNIX User
- OSS Pathname and Guardian Filename Conversions
- Running the OSS Shell and Commands From TACL
- Running Guardian Commands From the OSS Shell
- Running OSS Processes With Guardian Attributes
- Using OSS Commands to Manage Guardian Objects
- 5 Interoperating Between Programming Environments
- 6 OSS Porting Considerations
- 7 Porting UNIX Applications to the OSS Environment
- 8 Migrating Guardian Applications to the OSS Environment
- General Migration Guidelines
- C Compiler Issues for Guardian Programs
- Using New and Extended Guardian Procedures
- Using OSS Functions in a Guardian Program
- Interoperating With OSS Programs
- Starting an OSS Program From the Guardian Environment
- C Compiler Considerations for OSS Programs
- Porting a Guardian Program to the OSS Environment
- How Arguments Are Passed to the C or C++ Program
- Differences in the Two Run-Time Environments
- Which Run-Time Routines Are Available
- Use of Common Run-Time Environment (CRE) Functions
- Replacing Guardian Procedure Calls With Equivalent OSS Functions
- Which IPC Mechanisms Can Be Used
- Interactions Between Guardian and OSS Functions
- 9 Porting From Specific UNIX Systems
- 10 Native Migration Overview
- 11 Porting or Migrating Sockets Applications
- 12 Porting Threaded Applications
- A Equivalent OSS and UNIX Commands for Guardian Users
- B Equivalent Guardian Commands for OSS and UNIX Users
- C Equivalent Inspect Debugging Commands for dbx Commands
- D Equivalent Native Inspect Debugging Commands for dbx Commands
- E Standard POSIX Threads Functions: Differences Between the Previous and Current Standards
- Glossary
- Index
Migrating Guardian Applications to the OSS
Environment
Open System Services Porting Guide—520573-006
8-12
Guardian Process-Management Procedures
The following Guardian procedures support some actions on OSS files:
The FILE_GETINFO_ procedure obtains a limited set of information about a file
identified by file number and indicates whether the file is an OSS file or a Guardian file
with a flags word. A Guardian filename is returned in all cases, which can be mapped
to the corresponding OSS pathname using the Guardian
FILENAME_TO_PATHNAME_ procedure.
The FILE_GETINFOBYNAME_ procedure obtains information about a file identified by
a Guardian filename and indicates whether the file is an OSS file or a Guardian file
with a flags word.
The FILE_GETINFOLIST_ procedure obtains detailed information about a file identified
by file number; a related procedure, FILE_GETINFOLISTBYNAME_, obtains detailed
information about a file identified by filename. Information is returned according to the
items specified. In addition to information usually obtained for Guardian files, request
items can be made to return: security mechanisms in effect, whether the file is an OSS
file, requires OSS access permissions, OSS link count, OSS owner ID, and OSS group
ID.
The FILE_OPEN_ procedure can be used to open an OSS or a Guardian file. To open
an OSS file, specify an OSS pathname as an argument. OSS files can be opened only
in shared exclusion mode. OSS files can be opened for nowait I/O to perform nowait
read/write I/O operations.
Sample programs showing the use of some of these Guardian file system procedures
on OSS files are included in the Open System Services Programmer’s Guide.
Guardian Process-Management Procedures
OSS processes are accessible from the Guardian environment and can be
manipulated using Guardian procedures, providing interoperability between the
Guardian and OSS environments. Guardian procedures can create and control OSS
processes and can improve communication paths between Guardian processes and
Procedure Description
FILE_GETINFO_ Returns a limited set of information on a file, identified
by a file number
FILE_GETINFOBYNAME_ Returns a limited set of information on a file, identified
by a filename
FILE_GETINFOLIST_ Returns detailed information about a file, identified by a
file number
FILE_GETINFOLISTBYNAME_ Returns detailed information about a file, identified by a
filename
FILE_GETRECEIVEINFO_ Returns information about the last message read on the
$RECEIVE file
FILE_OPEN_ Establishes a communication path between an
application process and a file