IBM PASE for i Environment Variables
Overview
IBM® i PASE environment variables are independent of ILE environment variables. Setting a variable in one environment has no effect on the other environment, but several system interfaces allow you to copy variables between environments:
- The Qp2RunPase API lets you specify any list of
environment variables you want to initialize for the IBM PASE for i program. See
Run an IBM PASE for i Program (Qp2RunPase)
documentation for more information.
- The QP2SHELL and QP2TERM APIs initialize
the IBM PASE for i environment with a copy of nearly all ILE environment
variables. See Run an IBM PASE for i Program
(QP2SHELL) documentation for more information.
- The systemCL IBM PASE for i runtime function copies nearly
all IBM PASE for i environment variables to the ILE environment for option
SYSTEMCL_ENVIRON. See Run a CL
Command for IBM PASE for i (systemCL) documentation for more information.
- The IBM PASE for i system utility copies nearly all IBM PASE for i
environment variables to the ILE environment for option
-e. See IBM PASE for i system utility for
more information.
Special IBM PASE for i Environment Variables
Some IBM PASE for i runtime behaviors are different from AIX® because of differences between the two operating systems. You can use these IBM PASE for i environment variables to control some of the differences:
- PASE_EXEC_QOPENSYS
- PASE_EXEC_QOPENSYS can be used to prevent the system from
searching the /QOpenSys file system for an absolute path (starting with "/")
specified as an argument to exec or
Qp2RunPase, or in the first line of a shell script. The system
normally searches the /QOpenSys file system if the absolute path name for an
IBM PASE for i program or script cannot be opened or is not a regular bytestream
file. IBM i directory /usr/bin contains links to QShell utilities that cannot
run as IBM PASE for i programs, so searching /QOpenSys allows more AIX programs
and shell scripts to run unchanged (using IBM PASE for i utilities in directory
/QOpenSys/usr/bin). The system does not do an extended search in the /QOpenSys
file system if the IBM PASE for i shell or other program that calls
exec or Qp2RunPase has changed credentials
(setuid or setgid) or if the IBM PASE for i
environment specifies PASE_EXEC_QOPENSYS=N.
- PASE_FORK_JOBNAME
- PASE_FORK_JOBNAME specifies the IBM i job name for a new process created with the fork() or f_fork() function.
Only the first 10 characters in the string are used, and lowercase characters are converted to uppercase.
The specified value is ignored and a default job name is used if the string does not follow IBM i simple name rules (first character alphabetic and subsequent characters alphameric or underscore).
Prestarted job are never used when a fork job name is specified.
See Create A New Process with IBM PASE for i Options (fork400 or f_fork400) for information about specifying the IBM i job name for specific fork operations.
Some IBM PASE for i shells (including the default Korn shell) do not set environment variables for exported variables in the shell process itself. Setting PASE_FORK_JOBNAME in such a shell does not control job names for first-order utility processes created by that shell, but can control job names for processes forked by a utility started by the shell.
- PASE_MAXDATA64
- PASE_MAXDATA64 specifies the maximum number of 256MB
segments provided for brk (heap) storage in a 64-bit IBM PASE for i program. If
PASE_MAXDATA64 is omitted or contains an invalid value (either
non-numeric or less than one), a default of 256 segments (64GB) is used.
PASE_MAXDATA64 has no effect on 32-bit IBM PASE for i programs,
and it must be set either in the initial environment passed to
Qp2RunPase or before running exec for a
64-bit IBM PASE for i program.
- PASE_MAXSHR64
- PASE_MAXSHR64 specifies the maximum number of 256MB
segments provided for shared memory (shmat and mmap) in a 64-bit IBM PASE for i
program. If PASE_MAXSHR64 is omitted or contains an invalid
value (either non-numeric or less than one), a default of 256 segments (64GB)
is used. PASE_MAXSHR64 has no effect on 32-bit IBM PASE for i
programs, and it must be set either in the initial environment passed to
Qp2RunPase or before running exec for a
64-bit IBM PASE for i program.
- PASE_STDIO_ISATTY
- The default behavior of the IBM PASE for i isatty runtime
function returns true for file descriptors 0, 1, and 2 (stdin, stdout, and
stderr), regardless of whether the open file is a tty device. Setting IBM PASE for i
environment variable PASE_STDIO_ISATTY to N, either in
the initial environment passed to Qp2RunPase or before the
first invocation of isatty, causes isatty to
return an accurate indication of whether the open file is a tty device.
- PASE_SYSCALL_NOSIGILL
- The IBM PASE for i kernel exports some system calls that are implemented by
the AIX kernel but are unsupported by IBM PASE for i. The default behavior for any unsupported syscall is to
send exception message MCH3204, which the system converts to IBM PASE for i signal
SIGILL. The unsupported syscall returns a function result of
-1 with IBM i-unique errno EUNKNOWN (3474) if the signal is ignored or the
handler returns. Message MCH3204 appears in the IBM i job log to provide the
name of the unsupported system call and the IBM PASE for i instruction address
that caused the error. The message may also include the internal dump
identifier for a VLOG entry that contains this information:
syscall number (GPR2 value) IBM PASE for i instruction address Link register value GPR3-10 values (if available, or zero otherwise) syscall name (if known, converted to uppercase)
IBM PASE for i programs can suppress the exception message and SIGILL signal for unsupported system calls by setting environment variable PASE_SYSCALL_NOSIGILL either in the initial environment passed to Qp2RunPase or before running exec. PASE_SYSCALL_NOSIGILL is ignored if the IBM PASE for i program has the S_ISUID or S_ISGID attribute, but otherwise is interpreted as a list of syscall function names with optional errno values, delimited by colons. The colon-delimited values must take one of these forms:
syscall_name syscall_name=errno_name (errno_name is EINVAL, EPERM, and so on) syscall_name=errno_number (errno_number is 0-127)
SIGILL is suppressed for any syscall_name in the list that is recognized as an IBM PASE for i system call. The first or only entry in the list may use a special syscall_name of "ALL" to set a default behavior for all unsupported syscalls. Any entry in the list that is not an IBM PASE for i syscall name is ignored, and specifying the name of a syscall that is supported by the IBM PASE for i kernel has no effect on the operation of that syscall.
Any syscall in the PASE_SYSCALL_NOSIGILL list that is unsupported by the IBM PASE for i kernel returns a function result of -1 with the specified errno value (defaulting to ENOSYS) except that specifying errno_number of 0 causes the unsupported syscall to return a function result of zero (without setting errno). An invalid errno_name or errno_number defaults to ENOSYS.
For example, the following PASE_SYSCALL_NOSIGILL value suppresses SIGILL for all unsupported syscalls. "quotactl" returns EPERM and "audit" returns function result of zero, while all other unsupported syscalls return ENOSYS:
export PASE_SYSCALL_NOSIGILL=ALL:quotactl=EPERM:audit=0
Note: PASE_SYSCALL_NOSIGILL is not intended for production programs. It is provided as a convenience for feasibility testing using unchanged AIX binaries that need to be modified for production.
- PASE_THREAD_ATTACH
- If IBM PASE for i environment variable PASE_THREAD_ATTACH is
set to Y when an IBM PASE for i program runs libpthreads.a initialization (usually
at program startup), an ILE thread that was not started by IBM PASE for i will be
attached to IBM PASE for i when it calls an IBM PASE for i procedure (using
Qp2CallPase or Qp2CallPase2). Once an ILE
thread has attached to IBM PASE for i, that thread is subject to asynchronous
interruption for IBM PASE for i functions such as signal handling and thread
cancellation. In particular, the thread will be canceled as part of ending the
IBM PASE for i program (when exit runs or IBM PASE for i processing
terminates for a signal).
- PASE_UNLIMITED_PATH_MAX
- The IBM i Integrated File System supports longer path names than the value
of PATH_MAX (1023) in AIX header file
<limits.h>. Setting IBM PASE for i environment variable
PASE_UNLIMITED_PATH_MAX to Y, either in the initial
environment passed to Qp2RunPase or before running
exec, allows an IBM PASE for i program to access objects with
long path names. IBM PASE for i loader functions and some library runtime
functions can fail with path names longer than AIX
PATH_MAX.
- PASE_USRGRP_LIMITED
- IBM i user names and group names returned by runtime functions such as getpwuid and getgrgid may be up to 10 characters, while traditionally AIX defaults to limiting user and group names to 8 characters. For applications that are not designed to handle user or group names greater than 8 characters, you can prevent the system from returning information for these users or groups by setting IBM PASE for i environment variable PASE_USRGRP_LIMITED to Y.
- NOTE: When PASE_USRGRP_LIMITED is set to Y, system APIs such as getpwuid and getgrgid which would return user or group information whose names are greater than 8 characters return an error indicating the user or group was not found instead.
- PASE_USRGRP_LOWERCASE
- IBM i user names and group names are case-insensitive, but the system stores and returns them in uppercase. IBM PASE for i runtime functions that return user names and group names (getpwnam, getpwuid, getgrnam, and getgrgid) default to converting them to lowercase unless IBM PASE for i environment variable PASE_USRGRP_LOWERCASE is set to N.