diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-03-18 06:59:01 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-03-18 06:59:01 +0000 |
commit | 7b70f697aee2805d069e380f2a85f3c6f8fb1979 (patch) | |
tree | def0e3762ef49d21e28973804f74a58d5d6a0214 | |
parent | 8e5b247cc1a7a8cdf6dfc8f0b4cd1e354cd84574 (diff) |
In prep for killing ps_mainproc, use pr->ps_pid instead of
pr->ps_mainproc->p_pid to get the PID.
ok matthew@
-rw-r--r-- | sys/kern/sysv_msg.c | 6 | ||||
-rw-r--r-- | sys/kern/sysv_sem.c | 4 | ||||
-rw-r--r-- | sys/kern/sysv_shm.c | 6 | ||||
-rw-r--r-- | sys/kern/uipc_usrreq.c | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index 5c0000c7e13..3c2ed063724 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_msg.c,v 1.26 2013/03/28 16:58:45 deraadt Exp $ */ +/* $OpenBSD: sysv_msg.c,v 1.27 2014/03/18 06:59:00 guenther Exp $ */ /* $NetBSD: sysv_msg.c,v 1.19 1996/02/09 19:00:18 christos Exp $ */ /* * Copyright (c) 2009 Bret S. Lambert <blambert@openbsd.org> @@ -547,7 +547,7 @@ msg_enqueue(struct que *que, struct msg *msg, struct proc *p) { que->msqid_ds.msg_cbytes += msg->msg_len; que->msqid_ds.msg_qnum++; - que->msqid_ds.msg_lspid = p->p_p->ps_mainproc->p_pid; + que->msqid_ds.msg_lspid = p->p_p->ps_pid; que->msqid_ds.msg_stime = time_second; TAILQ_INSERT_TAIL(&que->que_msgs, msg, msg_next); @@ -558,7 +558,7 @@ msg_dequeue(struct que *que, struct msg *msg, struct proc *p) { que->msqid_ds.msg_cbytes -= msg->msg_len; que->msqid_ds.msg_qnum--; - que->msqid_ds.msg_lrpid = p->p_p->ps_mainproc->p_pid; + que->msqid_ds.msg_lrpid = p->p_p->ps_pid; que->msqid_ds.msg_rtime = time_second; TAILQ_REMOVE(&que->que_msgs, msg, msg_next); diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index 0b6da202ef8..b5b8e1e515b 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_sem.c,v 1.45 2013/11/25 23:15:58 matthew Exp $ */ +/* $OpenBSD: sysv_sem.c,v 1.46 2014/03/18 06:59:00 guenther Exp $ */ /* $NetBSD: sysv_sem.c,v 1.26 1996/02/09 19:00:25 christos Exp $ */ /* @@ -738,7 +738,7 @@ done: for (i = 0; i < nsops; i++) { sopptr = &sops[i]; semptr = &semaptr->sem_base[sopptr->sem_num]; - semptr->sempid = p->p_p->ps_mainproc->p_pid; + semptr->sempid = p->p_p->ps_pid; } semaptr->sem_otime = time_second; diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 6b6736c153d..f850629e9a0 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_shm.c,v 1.55 2012/03/09 13:01:28 ariane Exp $ */ +/* $OpenBSD: sysv_shm.c,v 1.56 2014/03/18 06:59:00 guenther Exp $ */ /* $NetBSD: sysv_shm.c,v 1.50 1998/10/21 22:24:29 tron Exp $ */ /* @@ -275,7 +275,7 @@ sys_shmat(struct proc *p, void *v, register_t *retval) shmmap_s->va = attach_va; shmmap_s->shmid = SCARG(uap, shmid); - shmseg->shm_lpid = p->p_p->ps_mainproc->p_pid; + shmseg->shm_lpid = p->p_p->ps_pid; shmseg->shm_atime = time_second; shmseg->shm_nattch++; *retval = attach_va; @@ -441,7 +441,7 @@ shmget_allocate_segment(struct proc *p, shmseg->shm_perm.seq = shmseqs[segnum] = (shmseqs[segnum] + 1) & 0x7fff; shmseg->shm_perm.key = key; shmseg->shm_segsz = SCARG(uap, size); - shmseg->shm_cpid = p->p_p->ps_mainproc->p_pid; + shmseg->shm_cpid = p->p_p->ps_pid; shmseg->shm_lpid = shmseg->shm_nattch = 0; shmseg->shm_atime = shmseg->shm_dtime = 0; shmseg->shm_ctime = time_second; diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index e8e86297b98..cea89f690ca 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_usrreq.c,v 1.72 2014/01/24 06:00:01 guenther Exp $ */ +/* $OpenBSD: uipc_usrreq.c,v 1.73 2014/03/18 06:59:00 guenther Exp $ */ /* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */ /* @@ -468,7 +468,7 @@ unp_bind(struct unpcb *unp, struct mbuf *nam, struct proc *p) unp->unp_vnode = vp; unp->unp_connid.uid = p->p_ucred->cr_uid; unp->unp_connid.gid = p->p_ucred->cr_gid; - unp->unp_connid.pid = p->p_p->ps_mainproc->p_pid; + unp->unp_connid.pid = p->p_p->ps_pid; unp->unp_flags |= UNP_FEIDSBIND; VOP_UNLOCK(vp, 0, p); return (0); @@ -527,7 +527,7 @@ unp_connect(struct socket *so, struct mbuf *nam, struct proc *p) m_copy(unp2->unp_addr, 0, (int)M_COPYALL); unp3->unp_connid.uid = p->p_ucred->cr_uid; unp3->unp_connid.gid = p->p_ucred->cr_gid; - unp3->unp_connid.pid = p->p_p->ps_mainproc->p_pid; + unp3->unp_connid.pid = p->p_p->ps_pid; unp3->unp_flags |= UNP_FEIDS; so2 = so3; if (unp2->unp_flags & UNP_FEIDSBIND) { |