Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (P)
Guardian Procedure Calls Reference Manual—522629-013
12-173
PROCESS_SPAWN_ Procedure
In the C tdmext.h header file, the structures for the fdinfo parameter are defined as:
C programs should initialize the fdinfo structure by using the #define
DEFAULT_FDINFO in the tdmext.h header file.
Z^Len
is the length of the ZSYS^DDL^FDINFO structure including one occurrence of the
Z^FDENTRY substructure. Because the structure is subject to change, Z^LEN is
used by PROCESS_SPAWN_ to identify the version of the structure.
Z^Timeout
indicates how long the new process waits for the OSS open() and dup()
functions to complete opening and duplicating all files specified in Z^FDENTRY.
Z^TIMEOUT can have these values:
> 0D specifies a wait-for-completion. The value specifies the maximum time
(in 1-second units) that the new process can wait for completion of the
OSS
open() and dup() functions. If PROCESS_SPAWN_ is called
in a nowait manner, the completion message is sent when the
Z^TIMEOUT value is reached or when all files are opened or
duplicated, whichever comes first.
= -1D specifies an indefinite wait. If PROCESS_SPAWN_ is called in a
nowait manner, the completion message is sent when all files are
opened or duplicated.
= 0D specifies a return after the new process is created. After the new
process is created, PROCESS_SPAWN_ returns immediately to the
caller, regardless of whether open or duplication completions occur. If
PROCESS_SPAWN_ is called in a nowait manner, the completion
message is sent when the new process is created.
typedef struct fdinfo {
long z_len;
long z_timeout;
long z_umask;
char *z_cwd;
long z_fdcount;
fdentry_def z_fdentry;
} fdinfo_def;
typedef struct fdentry {
long z_fd;
long z_dupfd;
char *z_name;
long z_oflag;
long z_mode;
} fdentry_def;