Received: by mail.netbsd.org (Postfix, from userid 605) id DDA6414A420; Sat, 7 Nov 2015 20:43:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 8618A14A41E for ; Sat, 7 Nov 2015 20:43:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at NetBSD.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.NetBSD.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id Rt8u6V7XEr06 for ; Sat, 7 Nov 2015 20:43:24 +0000 (UTC) Received: from cvs.netbsd.org (cvs.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe30:95bd]) by mail.netbsd.org (Postfix) with ESMTP id BCE5014A415 for ; Sat, 7 Nov 2015 20:43:23 +0000 (UTC) Received: by cvs.netbsd.org (Postfix, from userid 500) id BADB598; Sat, 7 Nov 2015 20:43:23 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sat, 7 Nov 2015 20:43:23 +0000 From: "Soren Jacobsen" Subject: CVS commit: [netbsd-5] src/sys/kern To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20151107204323.BADB598@cvs.netbsd.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Soren Jacobsen" Mail-Followup-To: source-changes-d@NetBSD.org Module Name: src Committed By: snj Date: Sat Nov 7 20:43:23 UTC 2015 Modified Files: src/sys/kern [netbsd-5]: kern_exec.c kern_exit.c kern_synch.c Log Message: Pull up following revision(s) (requested by pgoyette in ticket #1979): sys/kern/kern_synch.c: revision 1.309 sys/kern/kern_exit.c: revisions 1.246, 1.247 sys/kern/kern_exec.c: revision 1.419 In execve_runproc(), update the p_waited entry for the process being moved to SSTOP state, not for its parent. (It is correct to update the parent's p_nstopchild count.) If the value is not already zero, it could prevent its parent from waiting for the process. Fixes PR kern/50298 -- When clearing out the scheduler queues during system shutdown, we move all processes to the SSTOP state. Make sure we update each process's p_waited and the parents' p_nstopchild counters to maintain consistent values. Should not make any real difference this late in the shutdown process, but we should still be consistent just in case. Fixes PR kern/50318 -- Currently, if a process is exiting and its parent has indicated no intent of reaping the process (nor any other children), the process wil get reparented to init. Since the state of the exiting process at this point is SDEAD, proc_reparent() will not update either the old or new parent's p_nstopchild counters. This change causes both old and new parents to be properly updated. Fixes PR kern/50300 -- For processes marked with PS_STOPEXIT, update the process's p_waited value, and update its parent's p_nstopchild value when marking the process's p_stat to SSTOP. The process needed to be SACTIVE to get here, so this transition represents an additional process for which the parent needs to wait. Fixes PR kern/50308 To generate a diff of this commit: cvs rdiff -u -r1.280.4.3 -r1.280.4.4 src/sys/kern/kern_exec.c cvs rdiff -u -r1.214.4.2 -r1.214.4.3 src/sys/kern/kern_exit.c cvs rdiff -u -r1.254.2.6 -r1.254.2.7 src/sys/kern/kern_synch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.