Open System Services System Calls Reference Manual (G06.25+, H06.03+)

tdm_spawnp(2) OSS System Calls Reference Manual
pe_heap_max Species the maximum size of the heap in bytes for the new process if it is a
native process.
See the C/C++ Programmers Guide description of the HEAP pragma for gui-
dance on the use of nonzero values for this eld.
If a value is specied for this eld for G-series TNS or accelerated object les,
the specied value is ignored.
pe_space_guarantee
Species the minimum available swap space to guarantee for the new process.
If the calling process species a value, the value must be less than or equal to a
multiple of the page size of the processor in which the new process will run.
Values less than a multiple of the page size are rounded up to the next multiple
of the page size. If the parent process species a nonzero value, that value is |
used for the child process; otherwise, the child process inherits the space guaran- |
tee attribute of the parent process.
If the new process requires a guarantee of available swap space and the system
cannot guarantee the required amount, the function call fails, and errno is set to
the value of [EAGAIN].
If a value is specied for this eld for G-series TNS or accelerated object les,
the specied value is used for the main stack of the new process.
For detailed information about Guardian process attributes, see the PROCESS_LAUNCH_ pro-
cedure in the Guardian Procedure Calls Reference Manual.
Output Structure Information
If the pr_results parameter does not contain a null pointer, it points to an output structure dened
in the tdmext.h header le. This structure can contain elds that vary from RVU to RVU,
including reserved and ller elds.
First, the output structure must be initialized by using the #dene
DEFAULT_PROCESS_EXTENSION_RESULTS. This initialization sets the value of the
pr_len eld to the correct value for the current RVU. The value of the pr_len eld should not be
modied after being set by #dene DEFAULT_PROCESS_EXTENSION_RESULTS.
The process_extension_results output structure is described in the
process_extension_results(5) reference page.
EXAMPLES
This example uses the tdm_spawnp() function to perform I/O redirection in a new process:
if ((NewStdOut = open ("newout", ...)) != -1)
/* process the error */
fd_map[0] = 0;
fd_map[1] = NewStdOut;
fd_map[2] = 2;
fd_count = 3;
tdm_spawnp(..., fd_count, fd_map, ...);
close(NewStdOut);
868 Hewlett-Packard Company 527186-003