summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-06-05 08:05:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-06-05 08:05:55 +0000
commit6e66ef0e1dfd178e17eb844585bda1fba8c3662e (patch)
tree1bdc863f221e8b59903635d34b23003f03084406 /sys/kern/kern_exec.c
parentd7e0d96339ce65ea987f835811687384d11c0862 (diff)
kill the other timers too
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 6de528c9d24..afef8c589d9 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.10 1997/06/04 14:34:17 deraadt Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.11 1997/06/05 08:05:54 deraadt Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -480,10 +480,16 @@ sys_execve(p, v, retval)
p->p_cred->p_svgid = p->p_ucred->cr_gid;
if (p->p_flag & P_SUGIDEXEC) {
- int s = splclock();
+ int i, s = splclock();
+
untimeout(realitexpire, (void *)p);
timerclear(&p->p_realtimer.it_interval);
timerclear(&p->p_realtimer.it_value);
+ for (i = 0; i < sizeof(p->p_stats->p_timer) /
+ sizeof(p->p_stats->p_timer[0]); i++) {
+ timerclear(&p->p_stats->p_timer[i].it_interval);
+ timerclear(&p->p_stats->p_timer[i].it_value);
+ }
splx(s);
}