Re: [PATCH] use pid_alive in proc_pid_status

From: Roland McGrath
Date: Thu Dec 02 2004 - 20:07:18 EST


> But I don't understand the lines in wait_task_zombie that reset
> exit_state from DEAD to ZOMBIE, so perhaps I overlook something.

This happens when a sys_wait* call tries to reap a process, but then has
some problem like EFAULT. It then abandons the reaping attempt by turning
DEAD back into ZOMBIE, so another sys_wait* call can succeed later. So,
during this brief window it can be in DEAD though it in fact is never
reaped and the PID remains bound to that task_struct throughout.
If you don't want to rule out ZOMBIE, you can't really rule out DEAD.


Thanks,
Roland
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/