Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (P)
Guardian Procedure Calls Reference Manual522629-013
12-189
PROCESS_SPAWN_ Procedure
C programs should initialize the process_extension_results structure by using the
#define DEFAULT_PROCESS_EXTENSION_RESULTS in the tdmext.h header file.
Z^Len
is the length of the ZSYS^DDL^PROCESSRESULTS structure. Because the
structure is subject to change, Z^LEN is used by PROCESS_SPAWN_ to identify
the version of the structure.
Z^Phandle
returns the process handle of the new process. If you created the process in a
nowait manner, the process handle is returned in the completion message sent to
$RECEIVE rather than in this parameter.
Z^PID
returns the process ID of the new process. If you created the process in a nowait
manner, then the returned value is 0D and the process ID is returned in the
completion message sent to $RECEIVE. If an error occurs (Z^ERRNO or
Z^TPCERROR are not 0), then the returned value is -1D.
Z^Errno
indicates the outcome of the process creation.
The more common OSS errno values returned in Z^ERRNO are:
Z^ERRNO Description
0 No error. The corresponding OSS errno value is ENOERR.
4002 No such pathname exists. The corresponding OSS errno value is
ENOENT.
4005 A physical input or output error occurred. The corresponding OSS
errno value is EIO.
4007
The argument list, specified by the
argv parameter, is too long.
The corresponding OSS errno value is E2BIG.
4008
The
oss-program-file parameter has the appropriate
permissions, but is not in the format for executable files. The
corresponding OSS errno value is ENOEXEC.
4009
A file descriptor specified in the
fdinfo parameter is either out of
range or does not exist. The corresponding OSS errno value is
EBADF.
4011 System resources are inadequate. The corresponding OSS errno
value is EAGAIN.
4012 There is insufficient user memory to create the process. The
corresponding OSS errno value is ENOMEM.
4013 Search permission is denied on a component of the pathname
prefix. The corresponding OSS errno value is EACCES.