sched: Fix tg_flags check with GROUP_FLAG_NOCLDWAIT
Jira: PDFW15IS-208 Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
4489d3bdca
commit
150036eb8b
@ -204,7 +204,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options)
|
||||
#ifdef CONFIG_SCHED_CHILD_STATUS
|
||||
/* Does this task retain child status? */
|
||||
|
||||
retains = ((rtcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0);
|
||||
retains = ((rtcb->group->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0);
|
||||
|
||||
if (rtcb->group->tg_children == NULL && retains)
|
||||
{
|
||||
|
@ -346,7 +346,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options)
|
||||
#ifdef CONFIG_SCHED_CHILD_STATUS
|
||||
/* Does this task retain child status? */
|
||||
|
||||
retains = ((rtcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0);
|
||||
retains = ((rtcb->group->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0);
|
||||
|
||||
if (rtcb->group->tg_children == NULL && retains)
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ int task_reparent(pid_t ppid, pid_t chpid)
|
||||
{
|
||||
/* Has the new parent's task group supressed child exit status? */
|
||||
|
||||
if ((pgrp->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0)
|
||||
if ((pgrp->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0)
|
||||
{
|
||||
/* No.. Add the child status entry to the new parent's task group */
|
||||
|
||||
@ -186,7 +186,7 @@ int task_reparent(pid_t ppid, pid_t chpid)
|
||||
* suppressed child exit status.
|
||||
*/
|
||||
|
||||
ret = ((ogrp->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0) ? -ENOENT : OK;
|
||||
ret = ((ogrp->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0) ? -ENOENT : OK;
|
||||
}
|
||||
|
||||
#else /* CONFIG_SCHED_CHILD_STATUS */
|
||||
@ -276,7 +276,7 @@ int task_reparent(pid_t ppid, pid_t chpid)
|
||||
{
|
||||
/* Has the new parent's task group supressed child exit status? */
|
||||
|
||||
if ((ptcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0)
|
||||
if ((ptcb->group->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0)
|
||||
{
|
||||
/* No.. Add the child status entry to the new parent's task group */
|
||||
|
||||
@ -299,7 +299,7 @@ int task_reparent(pid_t ppid, pid_t chpid)
|
||||
* suppressed child exit status.
|
||||
*/
|
||||
|
||||
ret = ((otcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0) ? -ENOENT : OK;
|
||||
ret = ((otcb->group->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0) ? -ENOENT : OK;
|
||||
}
|
||||
|
||||
#else /* CONFIG_SCHED_CHILD_STATUS */
|
||||
|
@ -237,7 +237,7 @@ static inline void task_saveparent(FAR struct tcb_s *tcb, uint8_t ttype)
|
||||
* the SA_NOCLDWAIT flag with sigaction().
|
||||
*/
|
||||
|
||||
if ((rtcb->group->tg_flags && GROUP_FLAG_NOCLDWAIT) == 0)
|
||||
if ((rtcb->group->tg_flags & GROUP_FLAG_NOCLDWAIT) == 0)
|
||||
{
|
||||
FAR struct child_status_s *child;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user