Lines Matching defs:Pr
83 struct ps_prochandle *Pr;
145 if ((Pr = proc_arg_xgrab(arg, NULL, PR_ARG_CORES,
159 Prelease(Pr, 0);
165 show_files(Pr);
166 Prelease(Pr, 0);
168 } else if ((Pr = Pgrab(pid, Fflag, &gret)) != NULL) {
169 if (Pcreate_agent(Pr) == 0) {
173 show_files(Pr);
174 Pdestroy_agent(Pr);
181 Prelease(Pr, 0);
182 Pr = NULL;
219 struct ps_prochandle *Pr = data;
269 dofcntl(Pr, info,
273 if (Pstate(Pr) != PS_DEAD) {
277 dosocket(Pr, info->pr_fd);
279 dofifo(Pr, info->pr_fd);
304 dotli(Pr, info->pr_fd);
324 show_files(struct ps_prochandle *Pr)
328 if (pr_getrlimit(Pr, RLIMIT_NOFILE, &rlim) == 0) {
338 (void) Pfdinfo_iter(Pr, show_file, Pr);
343 getflock(struct ps_prochandle *Pr, int fd, struct flock *flock_native)
349 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) {
351 ret = pr_fcntl(Pr, fd, F_GETLK, &flock_target);
356 ret = pr_fcntl(Pr, fd, F_GETLK, flock_native);
362 dofcntl(struct ps_prochandle *Pr, prfdinfo_t *info, int mandatory, int isdoor)
380 if (isdoor && (Pstate(Pr) != PS_DEAD))
381 show_door(Pr, fd);
383 } else if (isdoor && (Pstate(Pr) != PS_DEAD)) {
385 show_door(Pr, fd);
395 if ((Pstate(Pr) != PS_DEAD) && (getflock(Pr, fd, &flock) != -1)) {
487 show_door(struct ps_prochandle *Pr, int fd)
491 if (pr_door_info(Pr, fd, &door_info) != 0)
609 show_sockopts(struct ps_prochandle *Pr, int fd)
645 if (pr_getsockopt(Pr, fd, boolopts[i].level, boolopts[i].opt,
651 if (pr_getsockopt(Pr, fd, SOL_SOCKET, SO_LINGER, &l, &vlen) == 0 &&
659 if (pr_getsockopt(Pr, fd, SOL_SOCKET, SO_SNDBUF, &val, &vlen) == 0) {
664 if (pr_getsockopt(Pr, fd, SOL_SOCKET, SO_RCVBUF, &val, &vlen) == 0) {
669 if (pr_getsockopt(Pr, fd, IPPROTO_IP, IP_NEXTHOP, &nexthop_val,
687 show_sockfilters(struct ps_prochandle *Pr, int fd)
700 if (pr_getsockopt(Pr, fd, SOL_FILTER, FIL_LIST, fi, &len) != 0)
751 dopeerucred(struct ps_prochandle *Pr, int fd)
755 if (pr_getpeerucred(Pr, fd, &peercred) == 0) {
763 dosocket(struct ps_prochandle *Pr, int fd)
773 if (pr_getsockopt(Pr, fd, SOL_SOCKET, SO_TYPE, &type, &tlen) == 0)
776 show_sockopts(Pr, fd);
777 show_sockfilters(Pr, fd);
780 if (pr_getsockname(Pr, fd, sa, &len) == 0)
784 if (pr_getpeername(Pr, fd, sa, &len) == 0)
787 dopeerucred(Pr, fd);
792 dofifo(struct ps_prochandle *Pr, int fd)
794 dopeerucred(Pr, fd);
799 dotli(struct ps_prochandle *Pr, int fd)
807 if (pr_ioctl(Pr, fd, _I_CMD, &strcmd, sizeof (strcmd)) == 0)
812 if (pr_ioctl(Pr, fd, _I_CMD, &strcmd, sizeof (strcmd)) == 0)