Guardian Application Conversion Guide

Creating a High-PIN Process
Converting C Applications
096047 Tandem Computers Incorporated 5–15
NEWPROCESS (program_file,
priority,
memory_pages,
cpu,
process_id,
&err_return,
process_name,
home_terminal,
/* flags */ 0,
/* job_id */ ,
error_info);
On a D-series system, the NEWPROCESS[NOWAIT] procedure can create only a
low-PIN process. The D-series operating system provides the PROCESS_CREATE_
procedure to create a new low-PIN or high-PIN process in a waited or nowait manner.
The following procedure creates a new process in a waited manner. The system
returns the results in the returned value
error
and
error_detail
parameter:
#include <cextdecs(FILE_OPEN_, \
PROCESS_CREATE_ , \
WRITEREADX, \
FILE_CLOSE_)> nolist
...
char program_file[ZSYS_VAL_LEN_FILENAME + 1];
short process_handle[ZSYS_VAL_PHANDLE_WLEN];
short pf_length;
short error, priority, memory_pages, cpu, error_detail;
...
error = PROCESS_CREATE_(program_file, pf_length,
/* library_file */ ,
/* lf_length */ ,
/* swapfile */ ,
/* sf_length */ ,
/* ext_swapfile */ ,
/* esf_length */ ,
priority,
cpu,
process_handle,
error_detail);
If your program creates a new process in a nowait manner, the system returns the
results in system message -102 (PROCESS_CREATE_ completion), which is analogous
to system message -12 (NEWPROCESSNOWAIT completion). You read system
message -102 from $RECEIVE using the READ[X] or READUPDATE[X] procedure.
For additional information on creating processes in a nowait manner, creating
processes at a low PIN, and other information about the PROCESS_CREATE_
procedure, refer to Section 3, “Converting TAL Applications.”