Open System Services Programmer's Guide

swapfile, /* swap filename */
64, /* maximum length */
&swaplen, /* length of swap filename */
&errordetail, /* details of any errors */
&proctype, /* process type (1=OSS,0=Guardian) */
&osspid /* OSS process ID, if type=1 */
);
/* If unsuccessful, print error message and exit. */
if (retcode != 0) {
fprintf(stderr, "retcode = %d\n", retcode);
fprintf(stderr, "Failure details = %d\n",errordetail);
exit(1);
}
printf("Process filename = %s\n", proc_fname);
printf("Process priority = %d\n", priority);
printf("Home terminal = %s\n", hometerm);
printf("Process execution time = %ld microseconds\n", proc_time);
printf("CAID = %d, PAID = %d\n", caid, paid);
printf("Job ID = %d\n", jobid);
printf("Program filename = %s\n", programfile);
printf("Swap filename = %s\n", swapfile);
if(proctype == 1)
printf("OSS process ID = %d\n", osspid);
exit(0);
}
Example 35 gets information about an OSS process by passing the OSS process ID to
PROCESS_GETINFOLIST_. If no OSS process ID is provided from the command line, the OSS
process ID of the current process is obtained. Process information is returned in the values_list
buffer and printed.
Querying the Process Environment 133