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

System Functions (t) tdm_spawn(2)
NAME
tdm_spawn - Executes a new process with HP extensions
LIBRARY
G-series native OSS processes: /G/system/sysnn/zossksrl
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zosskdll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/yosskdll
SYNOPSIS
#include <spawn.h>
#include <tdmext.h>
[ extern char **environ; ]
pid_t tdm_spawn(
const char path,
const int fd_count,
const int fd_map[],
const struct inheritance inherit,
char const argv[],
char const envp[],
const struct process_extension pe_parms,
struct process_extension_results pr_results);
PARAMETERS
**environ Points to an array of character pointers to environment strings. The environment
strings define the OSS environment for the parent process. The environ array is
terminated by a null pointer.
path Points to a null-terminated string containing a pathname that identifies the new
process image file. The pathname is absolute if it starts with a slash ( / ) charac-
ter. Otherwise, the pathname is relative and is resolved by prefixing the current
working directory.
fd_count Specifies the number of file descriptors designated by the fd_map[]parameter.
All file descriptors higher than fd_count are closed in the new process. This
parameter can take values from 0 (zero) through POSIX_OPEN_MAX.
fd_map[] Maps file descriptors from the parent process to the new process. File descrip-
tors identified with the value SPAWN_FDCLOSED are closed in the new pro-
cess.
If this parameter is a null pointer, all open OSS file descriptors of the parent pro-
cess (except for files opened by Guardian function or procedure calls and those
with the FD_CLOEXEC attribute flag set) are inherited by the new process.
Such inherited file descriptors behave here as they do for the tdm_execve()
function.
inherit Points to a structure that allows the process group ID and signal mask of the new
process to be specified in addition to a list of signals that the new process will
take default action on. The structure is defined in the spawn.h header file.
argv[] Specifies an array of character pointers to null-terminated strings containing
arguments to be passed to the main function of the new program. argv[0] should
point to the null-terminated string containing the filename of the new process
image. The last member of this array must be a null pointer.
527186-023 Hewlett-Packard Company 843