Lines Matching refs:Pr

95 	struct ps_prochandle *Pr;  in main()  local
179 } else if ((Pr = Pgrab(pid, Fflag, &gret)) != NULL) { in main()
180 if (Pcreate_agent(Pr) == 0) { in main()
182 if (set_limits(Pr) != 0) in main()
188 show_limits(Pr); in main()
190 Pdestroy_agent(Pr); in main()
197 Prelease(Pr, 0); in main()
389 show_limits(struct ps_prochandle *Pr) in show_limits() argument
399 if (pr_getrlimit64(Pr, resource, &rlim) != 0) in show_limits()
471 set_one_limit(struct ps_prochandle *Pr, int which, rlim64_t cur, rlim64_t max) in set_one_limit() argument
479 if (pr_getrlimit64(Pr, which, &rlim) != 0) { in set_one_limit()
482 command, Pstatus(Pr)->pr_pid, strerror(errno)); in set_one_limit()
494 if (max > rlim.rlim_max && Pr != NULL) in set_one_limit()
500 new_prpriv = proc_get_priv(Pstatus(Pr)->pr_pid); in set_one_limit()
504 " %d: %s\n", command, Pstatus(Pr)->pr_pid, in set_one_limit()
523 old_prpriv = proc_get_priv(Pstatus(Pr)->pr_pid); in set_one_limit()
529 Pstatus(Pr)->pr_pid, strerror(errno)); in set_one_limit()
536 if (Psetflags(Pr, PR_KLC) != 0 || in set_one_limit()
537 Psetpriv(Pr, new_prpriv) != 0) { in set_one_limit()
541 Pstatus(Pr)->pr_pid, strerror(errno)); in set_one_limit()
542 (void) Punsetflags(Pr, PR_KLC); in set_one_limit()
550 if (pr_setrlimit64(Pr, which, &rlim) != 0) { in set_one_limit()
553 command, Pstatus(Pr)->pr_pid, strerror(errno)); in set_one_limit()
558 if (Psetpriv(Pr, old_prpriv) != 0) { in set_one_limit()
565 Pdestroy_agent(Pr); in set_one_limit()
569 command, Pstatus(Pr)->pr_pid); in set_one_limit()
572 if (Punsetflags(Pr, PR_KLC) != 0) { in set_one_limit()
576 command, Pstatus(Pr)->pr_pid); in set_one_limit()
590 set_limits(struct ps_prochandle *Pr) in set_limits() argument
597 if (set_one_limit(Pr, which, rlimit[which].rlim_cur, in set_limits()