diff options
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 5046191d86b..262352e6944 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.134 2013/03/30 06:32:25 tedu Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.135 2013/06/17 19:11:54 guenther Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -609,6 +609,10 @@ sys_execve(struct proc *p, void *v, register_t *retval) splx(s); } + /* reset CPU time usage for the thread, but not the process */ + timespecclear(&p->p_tu.tu_runtime); + p->p_tu.tu_uticks = p->p_tu.tu_sticks = p->p_tu.tu_iticks = 0; + uvm_km_free_wakeup(exec_map, (vaddr_t) argp, NCARGS); pool_put(&namei_pool, nid.ni_cnd.cn_pnbuf); |