Guardian Application Conversion Guide
Creating a High-PIN Process
Converting Pascal Applications
096047 Tandem Computers Incorporated 6–13
status := 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:
IMPORT BEGIN
?SOURCE $SYSTEM.SYSTEM.PEXTDECS (TYPES,
? PROCESS_CREATE_,
? FILE_OPEN_,
? Guardian_READ,
? Guardian_WRITE,
? FILE_CLOSE_)
END; { IMPORT }
...
char program_file[36];
char process_handle[20];
int pf_length;
int err, 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 or READUPDATE 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.”