Re: [PATCH 09/11] job control: reorganize wait_task_stopped()

From: Tejun Heo
Date: Sat May 14 2011 - 06:58:52 EST


Hello, Oleg.

On Fri, May 13, 2011 at 07:21:17PM +0200, Oleg Nesterov wrote:
> We already checked ->exit_state != ZOMBIE, and we are holding tasklist.
> The child can't exit. I mean, it can't change its ->exit_state.
>
> However, SIGKILL can clear SIGNAL_STOP_STOPPED, and we can "miss" it.
> But this looks correct, the child is no longer stopped but it is still
> not dead. So I think in this case wait(WNOHANG | WEXITED | WSTOPPED)
> can fail, notabug.

Hmmm... I don't know.

> OTOH, perhaps SIGKILL should set SIGNAL_STOP_CONTINUED in this case?
> And keep it if it was already set.

I'd rather avoid that. First of all, it's an extreme corner case and
I think introducing an extra state transition there is more likely to
cause trouble than helping anything. It might be theoretically
correct but there's no reason to introduce that at this point. If at
all possible, I think it would be better to make it either see STOPPED
or EXIT.

Thanks.

--
tejun
--
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/