| 313 | } |
| 314 | |
| 315 | void |
| 316 | post_execve(struct thread *td, int error, struct vmspace *oldvmspace) |
| 317 | { |
| 318 | struct proc *p; |
| 319 | |
| 320 | KASSERT(td == curthread, ("non-current thread %p", td)); |
| 321 | p = td->td_proc; |
| 322 | if ((p->p_flag & P_HADTHREADS) != 0) { |
| 323 | PROC_LOCK(p); |
| 324 | /* |
| 325 | * If success, we upgrade to SINGLE_EXIT state to |
| 326 | * force other threads to suicide. |
| 327 | */ |
| 328 | if (error == EJUSTRETURN) |
| 329 | thread_single(p, SINGLE_EXIT); |
| 330 | else |
| 331 | thread_single_end(p, SINGLE_BOUNDARY); |
| 332 | PROC_UNLOCK(p); |
| 333 | } |
| 334 | exec_cleanup(td, oldvmspace); |
| 335 | } |
| 336 | |
| 337 | /* |
| 338 | * kern_execve() has the astonishing property of not always returning to |
no test coverage detected