aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSean Eric Fagan <sef@FreeBSD.org>2000-01-10 04:09:05 +0000
committerSean Eric Fagan <sef@FreeBSD.org>2000-01-10 04:09:05 +0000
commit893618352c9569f73cc299ebae2c18f7a1ac17bc (patch)
tree0fafa798b2f0afc13705fecfc830b961db6440dc /sys
parent9090c22ce7e7c50d825ae85a9968d852b0958cdc (diff)
downloadsrc-893618352c9569f73cc299ebae2c18f7a1ac17bc.tar.gz
src-893618352c9569f73cc299ebae2c18f7a1ac17bc.zip
Handle the case where we truss an SUGID program -- in particular, we need
to wake up any processes waiting via PIOCWAIT on process exit, and truss needs to be more aware that a process may actually disappear while it's waiting. Reviewed by: Paul Saab <ps@yahoo-inc.com>
Notes
Notes: svn path=/head/; revision=55707
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_exit.c1
-rw-r--r--sys/kern/kern_prot.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 961738d53c48..9c2005c926cd 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -149,6 +149,7 @@ exit1(p, rv)
vmsizmon();
#endif
STOPEVENT(p, S_EXIT, rv);
+ wakeup(&p->p_stype); /* Wakeup anyone in procfs' PIOCWAIT */
/*
* Check if any loadable modules need anything done at process exit.
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 306b36ccd84f..e2a4f44bf44a 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -932,6 +932,6 @@ setsugid(p)
struct proc *p;
{
p->p_flag |= P_SUGID;
- if (p->p_pfsflags & PF_ISUGID)
+ if (!(p->p_pfsflags & PF_ISUGID))
p->p_stops = 0;
}