diff options
| author | Robert Drehmel <robert@FreeBSD.org> | 2002-11-26 17:30:55 +0000 |
|---|---|---|
| committer | Robert Drehmel <robert@FreeBSD.org> | 2002-11-26 17:30:55 +0000 |
| commit | d1989db5457f8e949f0edd0d90b98b08dacb7aee (patch) | |
| tree | 87a166ac96476dd3bd6de9618715cf9aef17c8d8 /sys/kern/kern_exec.c | |
| parent | db2661ce969f3a57af2f94d322836ec6a913a17d (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_exec.c')
| -rw-r--r-- | sys/kern/kern_exec.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 8f64cf41547b..8e2d03b28b34 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -567,8 +567,6 @@ interpret: * If tracing the process, trap to debugger so breakpoints * can be set before the program executes. */ - _STOPEVENT(p, S_EXEC, 0); - if (p->p_flag & P_TRACED) psignal(p, SIGTRAP); @@ -640,8 +638,14 @@ exec_fail_dealloc: if (imgp->object) vm_object_deallocate(imgp->object); - if (error == 0) + if (error == 0) { + /* + * Stop the process here if its stop event mask has + * the S_EXEC bit set. + */ + STOPEVENT(p, S_EXEC, 0); goto done2; + } exec_fail: /* we're done here, clear P_INEXEC */ |
