| 3380 | } |
| 3381 | |
| 3382 | void |
| 3383 | childproc_exited(struct proc *p) |
| 3384 | { |
| 3385 | int reason, status; |
| 3386 | |
| 3387 | if (WCOREDUMP(p->p_xsig)) { |
| 3388 | reason = CLD_DUMPED; |
| 3389 | status = WTERMSIG(p->p_xsig); |
| 3390 | } else if (WIFSIGNALED(p->p_xsig)) { |
| 3391 | reason = CLD_KILLED; |
| 3392 | status = WTERMSIG(p->p_xsig); |
| 3393 | } else { |
| 3394 | reason = CLD_EXITED; |
| 3395 | status = p->p_xexit; |
| 3396 | } |
| 3397 | /* |
| 3398 | * XXX avoid calling wakeup(p->p_pptr), the work is |
| 3399 | * done in exit1(). |
| 3400 | */ |
| 3401 | sigparent(p, reason, status); |
| 3402 | } |
| 3403 | |
| 3404 | #define MAX_NUM_CORE_FILES 100000 |
| 3405 | #ifndef NUM_CORE_FILES |