/* Get scheduler class name given process ID. */
main (argc, argv)
	int 			argc;
	char 			*argv[];
{
	pcinfo_t			pcinfo;
	id_t			pid, classID;
	id_t			getclassID();
	if ((pid = atoi(argv[1])) <= 0) {
			perror ("bad pid");
			exit (1);
	}
	if ((classID = getclassID(pid)) == -1) {
			perror ("unknown class ID");
			exit (2);
	}
	pcinfo.pc_cid = classID;
	if (priocntl (0L, 0L, PC_GETCLINFO, &pcinfo) == -1L) {
			perror ("PC_GETCLINFO failed");
			exit (3);
	}
	(void) printf("process ID %d, class %s\n", pid,
	 pcinfo.pc_clname);
} 
