Lines Matching defs:Pr
94 struct ps_prochandle *Pr;
178 } else if ((Pr = Pgrab(pid, Fflag, &gret)) != NULL) {
179 if (Pcreate_agent(Pr) == 0) {
181 if (set_limits(Pr) != 0)
187 show_limits(Pr);
189 Pdestroy_agent(Pr);
196 Prelease(Pr, 0);
388 show_limits(struct ps_prochandle *Pr)
398 if (pr_getrlimit64(Pr, resource, &rlim) != 0)
470 set_one_limit(struct ps_prochandle *Pr, int which, rlim64_t cur, rlim64_t max)
478 if (pr_getrlimit64(Pr, which, &rlim) != 0) {
481 command, Pstatus(Pr)->pr_pid, strerror(errno));
493 if (max > rlim.rlim_max && Pr != NULL)
499 new_prpriv = proc_get_priv(Pstatus(Pr)->pr_pid);
503 " %d: %s\n", command, Pstatus(Pr)->pr_pid,
522 old_prpriv = proc_get_priv(Pstatus(Pr)->pr_pid);
528 Pstatus(Pr)->pr_pid, strerror(errno));
535 if (Psetflags(Pr, PR_KLC) != 0 ||
536 Psetpriv(Pr, new_prpriv) != 0) {
540 Pstatus(Pr)->pr_pid, strerror(errno));
541 (void) Punsetflags(Pr, PR_KLC);
549 if (pr_setrlimit64(Pr, which, &rlim) != 0) {
552 command, Pstatus(Pr)->pr_pid, strerror(errno));
557 if (Psetpriv(Pr, old_prpriv) != 0) {
564 Pdestroy_agent(Pr);
568 command, Pstatus(Pr)->pr_pid);
571 if (Punsetflags(Pr, PR_KLC) != 0) {
575 command, Pstatus(Pr)->pr_pid);
589 set_limits(struct ps_prochandle *Pr)
596 if (set_one_limit(Pr, which, rlimit[which].rlim_cur,