Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758053AbYCaUa3 (ORCPT ); Mon, 31 Mar 2008 16:30:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755553AbYCaUaO (ORCPT ); Mon, 31 Mar 2008 16:30:14 -0400 Received: from mx1.redhat.com ([66.187.233.31]:35449 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755438AbYCaUaL (ORCPT ); Mon, 31 Mar 2008 16:30:11 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Oleg Nesterov X-Fcc: ~/Mail/linus Cc: Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] do_wait reorganization In-Reply-To: Oleg Nesterov's message of Monday, 31 March 2008 12:51:10 +0400 <20080331085110.GA400@tv-sign.ru> References: <20080329033412.120EE26FA1D@magilla.localdomain> <20080331035701.3926726F8E9@magilla.localdomain> <20080331085110.GA400@tv-sign.ru> X-Zippy-Says: Is this my STOP?? Message-Id: <20080331202910.5C4C926F8E9@magilla.localdomain> Date: Mon, 31 Mar 2008 13:29:10 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1095 Lines: 41 > This looks wrong, we shouldn't clear *retval if the child is EXIT_DEAD. You're right. Thanks for catching that. I think it should look like this: { int ret = eligible_child(type, pid, options, p); if (ret <= 0) return ret; if (p->exit_state == EXIT_DEAD) return 0; /* * We don't reap group leaders with subthreads. */ if (p->exit_state == EXIT_ZOMBIE && !delay_group_leader(p)) return wait_task_zombie(p, options, infop, stat_addr, ru); /* * It's stopped or running now, so it might * later continue, exit, or stop again. */ *retval = 0; if (task_is_stopped_or_traced(p)) return wait_task_stopped(p, options, infop, stat_addr, ru); return wait_task_continued(p, options, infop, stat_addr, ru); } What do you think? Thanks, Roland -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/