Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

fork(2) OSS System Calls Reference Manual
The parent process ID of the child process matches the PID of the parent.
The child process has its own copy of the parent processs file descriptors. However,
each of the child’s file descriptors shares a common file pointer with the corresponding
file descriptor of the parent process.
The child process does not inherit any file open created by a Guardian function or pro-
cedure call.
The child process does not inherit file locks.
The child processs tms_utime, tms_stime, tms_cutime, and tms_cstime values are set
to 0 (zero).
Any pending alarms are cleared in the child process.
Any signals pending for the parent process are not inherited by the child process.
Any adjust-on-exit (semadj) values of the parent process are cleared in the child process.
The child process shares directory streams with the parent. They share the same block of
directory entries. When reading an entry, the buffer pointer is advanced by one entry.
From the perspective of either process, an entry might be skipped.
If both processes call the readdir() function for a shared stream, the results are
undefined. After such a call by both functions, another call to the readdir() function by
either process has undefined results.
Guardian Attributes
The child process inherits the following Guardian attributes from the parent process:
Program file
Any library files
The size and contents of any instance data segments for native libraries
Priority (the child process inherits the parent’s current priority)
Processor on which the process executes
Home terminal
For G-series TNS or accelerated processes, the size and contents of the data segment
For G-series TNS or accelerated processes, the size and contents of the extended data
segment
The assignment of the data segment size is different from the assignment made when
creating a new process with Guardian procedures.
For native processes, the contents of the stack segment from the origin of the stack
through the currently in-use location; the balance of the child process stack contains 0
(zero)
For native processes, the size and contents of the globals-heap segment
Job ID
DEFINE mode
320 Hewlett-Packard Company 527186-023