summaryrefslogtreecommitdiff
path: root/sys/miscfs
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-03-10 05:54:29 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-03-10 05:54:29 +0000
commitd61a690bb1fb3482ac59dcc5921f333753c82a6b (patch)
tree5466be7ac0a9565271594703bd4295fed7f37092 /sys/miscfs
parentb379a7cafedd0ac7b6d970219ab48a3a32e18feb (diff)
Add PS_EXITING to better differentiate between the process exiting and
the main thread exiting. c.f. regress/sys/kern/main-thread-exited/
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/procfs/procfs_cmdline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/miscfs/procfs/procfs_cmdline.c b/sys/miscfs/procfs/procfs_cmdline.c
index 29accc47c49..b80aff97186 100644
--- a/sys/miscfs/procfs/procfs_cmdline.c
+++ b/sys/miscfs/procfs/procfs_cmdline.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_cmdline.c,v 1.9 2008/11/10 03:38:53 deraadt Exp $ */
+/* $OpenBSD: procfs_cmdline.c,v 1.10 2012/03/10 05:54:28 guenther Exp $ */
/* $NetBSD: procfs_cmdline.c,v 1.3 1999/03/13 22:26:48 thorpej Exp $ */
/*
@@ -99,7 +99,7 @@ procfs_docmdline(struct proc *curp, struct proc *p, struct pfsnode *pfs, struct
* Lock the process down in memory.
*/
/* XXXCDC: how should locking work here? */
- if ((p->p_flag & P_WEXIT) || (p->p_vmspace->vm_refcnt < 1)) {
+ if ((p->p_p->ps_flags & PS_EXITING) || (p->p_vmspace->vm_refcnt < 1)) {
free(arg, M_TEMP);
return (EFAULT);
}