From 3252e3528028d132912bb5d0b51b9d1226849216 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 20 Jul 2019 09:21:28 -0600 Subject: [PATCH] Add comments; minor spelling fix in comments. --- sched/sched/sched_waitpid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sched/sched/sched_waitpid.c b/sched/sched/sched_waitpid.c index 0130c9c310..fa786a4e8d 100644 --- a/sched/sched/sched_waitpid.c +++ b/sched/sched/sched_waitpid.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched/sched/sched_waitpid.c * - * Copyright (C) 2011-2013, 2015, 2017-2018 Gregory Nutt. All rights + * Copyright (C) 2011-2013, 2015, 2017-2019 Gregory Nutt. All rights * reserved. * Author: Gregory Nutt * @@ -429,7 +429,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) if (pid == (pid_t)-1) { /* We are waiting for any child, check if there are still - * chilren. + * children. */ DEBUGASSERT(!retains || rtcb->group->tg_children); @@ -542,6 +542,8 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) #ifdef CONFIG_SCHED_CHILD_STATUS if (retains) { + /* Recover the exiting child */ + child = group_exitchild(rtcb->group); DEBUGASSERT(child != NULL);