Lines Matching refs:pid

178 static int csops_internal(pid_t pid, int ops, user_addr_t uaddr, user_size_t usersize, user_addr_t uaddittoken);
333 proc_find(int pid)
335 return(proc_findinternal(pid, 0));
339 proc_findinternal(int pid, int locked)
347 p = pfind_locked(pid);
433 proc_find_zombref(int pid)
440 p = pfind_locked(pid);
640 proc_name(int pid, char * buf, int size)
644 if ((p = proc_find(pid)) != PROC_NULL) {
676 proc_signal(int pid, int signum)
680 if ((p = proc_find(pid)) != PROC_NULL) {
687 proc_issignal(int pid, sigset_t mask)
692 if ((p = proc_find(pid)) != PROC_NULL) {
859 pfind_locked(pid_t pid)
866 if (!pid)
869 for (p = PIDHASH(pid)->lh_first; p != 0; p = p->p_hash.le_next) {
870 if (p->p_pid == pid) {
873 if ((p !=q) && (q->p_pid == pid))
874 panic("two procs with same pid %p:%p:%d:%d\n", p, q, p->p_pid, q->p_pid);
887 pzfind(pid_t pid)
895 if (p->p_pid == pid)
1042 panic("enterpgrp: new pgrp and pid != pgid");
1428 * proc_core_name(name, uid, pid)
1429 * Expand the name described in corefilename, using name, uid, and pid.
1432 * %P process id (pid)
1439 proc_core_name(const char *name, uid_t uid, pid_t pid, char *cf_name,
1443 char id_buf[11]; /* Buffer for pid/uid -- max 4B */
1462 snprintf(id_buf, sizeof(id_buf), "%u", pid);
1489 log(LOG_ERR, "pid %ld (%s), uid (%u): corename is too long\n",
1490 (long)pid, name, (uint32_t)uid);
1714 return(csops_internal(uap->pid, uap->ops, uap->useraddr,
1731 return(csops_internal(uap->pid, uap->ops, uap->useraddr,
1736 csops_internal(pid_t pid, int ops, user_addr_t uaddr, user_size_t usersize, user_addr_t uaudittoken)
1752 if (pid == 0)
1753 pid = proc_selfpid();
1754 if (pid == proc_selfpid())
1779 pt = proc_find(pid);
1790 /* verify the audit token pid/idversion matches with proc */
1813 printf("CODE SIGNING: marked invalid by pid %d: "
2725 "not allowed: pid %d\n",
2730 "allowed: pid %d\n",
2834 proc_getpcontrol(int pid, int * pcontrolp)
2838 p = proc_find(pid);
2862 printf("low swap: throttling pid %d (%s)\n", p->p_pid, p->p_comm);
2869 printf("low swap: suspending pid %d (%s)\n", p->p_pid, p->p_comm);
2877 printf("low swap: killing pid %d (%s)\n", p->p_pid, p->p_comm);
2900 proc_resetpcontrol(int pid)
2911 p = proc_find(pid);
2924 printf("low swap: unthrottling pid %d (%s)\n", p->p_pid, p->p_comm);
2930 printf("low swap: resuming pid %d (%s)\n", p->p_pid, p->p_comm);
2938 printf("low swap: attempt to unkill pid %d (%s) ignored\n", p->p_pid, p->p_comm);