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
Interoperating Between User Environments
Open System Services Porting Guide—520573-006
4-6
Factors Affecting Shell Operation
to ON, the file is overwritten. The following table lists the more frequently used
-o option settings:
If you wish to display the names and values of the current parameter settings, use the
set command with no arguments. The set command with only the plus sign (+)
argument displays the names of all named parameters.
Variable Values
OSS shell variables are set using a command line that first has the variable name,
followed by an equal sign (=) and the value for the variable named. The PATH and PSn
variables are featured following.
PATH
The most important variable affecting shell operation is PATH. It is used by the OSS
shell as it is used by the Bourne and C shells: that is, to specify the directories and the
directory order that your system uses to search for, find, and execute commands. The
following sample command adds the current directory and the user’s $HOME directory
to the beginning of the program search path:
PATH=.:$HOME:$PATH
PSn
The PSn variables determine the prompts used by the OSS shell. n is either 1 or 2,
specifying the primary or secondary prompt string. The default for PS1 is the dollar sign
($); the default for PS2 is the right angle bracket (>) followed by a blank space.
The following sample command sets the prompt to contain the user's name, the
system name, the current directory, and the current line number:
PS1=$LOGNAME@(uname -n):'$PWD'[\!]
If the user name is the super ID, the system name is OSS, and the current directory is
/bin, the prompt would look like the following:
SUPER.SUPER@OSS:/bin[21]
Aliases and Functions
Aliases allow the OSS shell to perform command-name or abbreviation substitutions.
The value of the current shell aliases can be printed using the alias command with
no arguments.
-o Option Setting Description
set -o Displays values of all option settings.
set -o noclobber Turns on noclobber mode; output redirection to an existing file
causes command to abort.
set +o emacs Turns off emacs editing mode.