2    Terminology and General Requirements


2.2    Definitions


2.2.2    General Terms


2.2.2.4    Appropriate Privileges

On the operating system, appropriate privileges are associated with a process with an effective UID set to 0. To obtain privileges, a user can log in as root or as any other user whose UID is 0, or issue the su command with no arguments to change the current user identity to superuser.

An unprivileged process with a saved set-user-ID or real user UID of 0 can use the setuid() system call to change its effective UID to 0, the superuser UID. Saved set-user-ID and real user ID are set to 0 for an unprivileged process if that process has a privileged ancestor process. Privileges can be associated with executable code through the use of the S_ISUID bit. The S_ISUID bit is an attribute of a file stored on the file system. If the S_ISUID bit is set on a binary, whenever that binary is executed, the effective UID of the process that results through the execution of the binary is set to the UID of the owner of the binary file. Thus, if the owner of the binary file is root, which has a UID of 0, the effective UID of the process that results from the execution of the binary is UID 0, and the process is privileged.


2.2.2.13    Character Special File

The operating system supports character special file types in addition to terminal device types. Information about these files appears in the System Administration guide.


2.2.2.35    File

Other than regular file, character special file, block special file, FIFO special file, and directory file, the following file types are available:


2.2.2.71    Parent Process ID

On the operating system, if a child process continues to exist after its creator process ceases to exist, the parent process ID becomes the process ID of the init process, which has a PID of 1.


2.2.2.73    Pathname

A pathname that begins with two slashes (//) is interpreted as if it began with a single slash (/).


2.2.2.89    Process Lifetime

The following process resources are returned to the system after a process terminates but before its process ID is reaped by a call to wait() or waitpid():

All resources associated with a process are returned to the system when the process terminates, except for some small internal kernel data structures that are kept in place to track the process. When a wait or waitpid for the terminated process is issued, the PID of the terminated process and the kernel data structures associated with the terminated process are recycled.


2.2.2.91    Read-only File System

The operating system does not allow users to create, write, or update objects residing on read-only file systems.


2.2.2.105    Scheduling policy

How scheduling policy can affect process priority, under SCHED_FIFO and SCHED_RR policies:

  1. When a running process becomes blocked, it goes to the end of the process list for its priority.

  2. When a running process becomes preempted, it goes to the beginning of the process list for its priority.

  3. When a blocked process becomes runnable, it goes to the end of the process list for its priority.

  4. When a running process calls a function that can change the priority or scheduling policy of a process, the changed process goes to the end of the new priority process list.

  5. Under the SCHED_RR scheduling policy, when a process finishes its quantum it goes to the end of the process list for its priority.

Under the SCHED_OTHER timesharing scheduling policy, if a process is preempted or yields to another process, it goes to the end of the process list for the new priority.

Under the SCHED_OTHER scheduling policy, processes are allowed to run until they are preempted, yield to another process, or finish their quantum. If no equal or higher priority processes are waiting to run, the executing process is allowed to continue. However, while a process is running, the scheduler changes the process's priority. Over time, it is likely that a higher priority process will exist because the scheduler adjusts priority.


2.2.2.116    Supplementary Group ID

A process's effective group ID is included in its list of supplementary group IDs only if the effective group ID refers to a group of which the UID associated with the process is a member.


2.2.2.126    System Reboot

A system reboot (not a system crash, but an intentional reboot) will flush data to disk. Therefore, file data associated with message queues, semaphores, and memory mapped files will be saved to disk. Processes are not persistent across a system reboot.


2.3    General Concepts

This section discusses extended security controls, file access permissions, and updating file times.


2.3.5    File Times Update

Files that are marked for update are updated periodically.


2.4    Error Numbers

In addition to the errors listed in this clause, the operating system supports the following errors under the stated conditions:

Table 2-1: Additional Error Numbers

Name Description
[EADDRINUSE] Address already in use
[EADDRNOTAVAIL] Cannot assign requested address
[EAFNOSUPPORT] Address family not supported by protocol family
[EALREADY] Operation already in progress
[EBADMSG] Next message has wrong type
[EBADRPC] RPC struct is bad
[ECANCELED] Operation canceled
[ECLONEME] Tells open() to clone the device
[ECONNABORTED] Software caused connection abort
[ECONNREFUSED] Connection refused
[ECONNRESET] Connection reset by peer
[EDESTADDRREQ] Destination address required
[EDIRTY] Mounting a dirty file system without force
[EDQUOT] Disc quota exceeded
[EDUPPKG] Duplicate package name on install
[EFAIL] Cannot start operation
[EFTYPE] Inappropriate operation for file type
[EHOSTDOWN] Host is down
[EHOSTUNREACH] No route to host
[EIDRM] Identifier removed
[EINPROG] Operation now in progress
[EINPROGRESS] Operation now in progress
[EISCONN] Socket already in use
[ELOOP] Too many levels of symbolic links
[EMEDIA] Hard ECC or similar disk media failure
[EMSGSIZE] Message too long
[EMTIMERS] Too many timers
[ENETDOWN] Network is down
[ENETRESET] Network dropped connection on reset
[ENETUNREACH] Network is unreachable
[ENOBUFS] No buffer space available
[ENODATA] No message on stream head read queue
[ENOMSG] No message of desired type
[ENOPKG] Unresolved package name
[ENOPROTOOPT] Protocol not available
[ENOSR] Out of streams resources
[ENOSTR] File descriptor not associated with a stream
[ENOSYM] Unresolved symbol name
[ENOTBLK] Block device required
[ENOTCONN] Socket is not connected
[ENOTSOCK] Socket operation on nonsocket
[ENOTSUP] Function not implemented
[EOPNOTSUPP] Operation not supported on socket
[EPFNOSUPPORT] Protocol family not supported
[EPROGMISMATCH] Program version wrong
[EPROGUNAVAIL] RPC program not available
[EPROCLIM] Too many processes
[EPROCUNAVAIL] Bad procedure for program
[EPROTO] Streams protocol error
[EPROTONOSUPPORT] Protocol not supported
[EPROTOTYPE] Protocol wrong type for socket
[EREMOTE] Too many levels of remote in path
[ERPCMISMATCH] RPC version wrong
[ESHUTDOWN] Cannot send after socket shutdown
[ESOCKTNOSUPPORT] Socket type not supported
[ESOFT] Correctable disk error
[ESTALE] Stale file system
[ETIME] System call timed out
[ETIMEDOUT] Connection timed out
[ETOOMANYREFS] Too many references: cannot splice
[ETXTBSY] Text file busy
[EUSERS] Too many users
[EVERSION] Version number mismatch
[EWOULDBLOCK] Operation would block

The operating system reliably detects the [EFAULT] error condition if the address is actually used.

On the operating system, the [EFBIG] error occurs when the size of a file exceeds the maximum file size of 2^40 bytes.


2.5    Primitive System Data Types

In addition to those primitive system data types listed in POSIX.1 Table 2-1, the operating system supports the following types whose names end with _t in headers specified by POSIX.1:

Table 2-2: Primitive System Data Types

Defined Type Header
caddr_t sys/types.h
chan_t sys/types.h
clock_t sys/types.h
cnt_t sys/types.h
daddr_t sys/types.h
devs_t sys/types.h
fixpt_t sys/types.h
fpos_t sys/types.h
key_t sys/types.h
label_t sys/types.h
level_t sys/types.h
major_t sys/types.h
mid_t sys/types.h
minor_t sys/types.h
paddr_t sys/types.h
physadr_t sys/types.h
ptrdiff_t sys/types.h
qaddr_t sys/types.h
sig_t sys/types.h
sigset_t sys/types.h
slab_t sys/types.h
swblk_t sys/types.h
time_t sys/types.h
timer_t sys/types.h
uchar_t sys/types.h
uint_t sys/types.h
ulong_t sys/types.h
ushort_t sys/types.h
vuchar_t sys/types.h
vuint_t sys/types.h
vulong_t sys/types.h
vushort_t sys/types.h
wchar_t sys/types.h


2.6    Environment Description

Environment variable names can contain any 8-bit character except the equal sign (=) or NUL ('\0').


2.7    C Language Definitions

This section contains information on POSIX.1 symbols.


2.7.2    POSIX.1 Symbols

The following additional feature test macros are available under the operating system:

_ANSI_C_SOURCE
When an application includes a header defined by ANSI X3.159-1989, all symbols required to be defined are made visible. Also, when that header is included, only those symbols permitted to be defined by ANSI X3.159-1989 are made visible, except for those symbols specifically made visible by other feature test macros.

_XOPEN_SOURCE
When an application includes a header defined by the X/Open Portability Guide Issue 4 (XPG4), all symbols required to be defined are made visible. Also, when that header is included, only those symbols permitted to be defined by XPG4 are made visible, except for those symbols specifically made visible by other feature test macros.

_AES_SOURCE
When an application includes a header defined by AES/OSF/1, all symbols required to be defined are made visible. Also, when that header is included, only those symbols permitted to be defined by AES/OSF/1 are made visible, except for those symbols specifically made visible by other feature test macros.

_OSF_SOURCE
When an application includes a header defined to include OSF/1 extensions, all symbols defined in that header are made visible.


2.8    Numerical Limits


2.8.3    Run-Time Increasable Values

{NGROUPS_MAX} is set to 32 in <limits.h>.


2.8.4    Run-Time Invariant Values (Possibly Indeterminate)

On the operating system, the following magnitude limitations (names and values) are defined when <limits.h> is included.

Table 2-3: Run-Time Increasable Values

Name Value Comments
ARG_MAX 38912 Maximum bytes for an exec function
CHILD_MAX 100 Maximum processes per user
OPEN_MAX 64 See sysconf(3) for details
STREAM_MAX Omitted Value is indeterminate
TZNAME_MAX 255 Maximum number of bytes supported for the name of a time zone (not of the TZ variable)


2.8.5    Pathname Variable Values

The values in this table are constant from one pathname to another:

Name Value Comments
LINK_MAX 32767 Maximum link file count
MAX_CANON 255 Maximum bytes in a terminal canonical input line
MAX_INPUT 255 Maximum number of supplemental group IDs
NAME_MAX 255 Maximum number of bytes in a filename
PATH_MAX 1023 Maximum number of bytes in a pathname
PIPE_BUF 4096 Maximum number of bytes that can be written atomically when writing to a pipe


2.9    Symbolic Constants

All constants in Table 2-10 are defined TRUE (1), except:

_POSIX_PRIORITIZED_IO, not defined in <unistd.h>

_POSIX_VERSION, defined 199506L

All constants in Table 2-11 are defined TRUE (1), except:

_POSIX_CHOWN_RESTRICTED = 0

_POSIX_NO_TRUC = 0

_POSIX_VDISABLE = 0377


2.9.3    Compile-Time Symbolic Constants for Portability Specifications

On the operating system, the following values are used when <unistd.h> is included:

Table 2-4: Symbolic Constants

Symbolic Constant Value Comments


2.9.4    Execution-Time Symbolic Constants for Portability Specifications

On the operating system, <unistd.h> contains the following values:

Symbolic Constant Value Comments Files
_POSIX_CHOWN_RESTRICTED 0 The chown command requires appropriate privileges. all files
_POSIX_NO_TRUNC 0 Pathname components longer than {NAME_MAX} generate an error. all files
_POSIX_VDISABLE 0377 Terminal special characters defined in Section 7.1.1.9 can be disabled using this character value. all terminal device files