sched/sched/sched_waitid.c: Allow WNOHANG

In the current implementation of waitid, WEXITED is mandatory and WNOHANG is optional.
This commit is contained in:
Yoshinori Sugino 2020-11-06 15:37:05 +09:00 committed by Xiang Xiao
parent 51875ab039
commit d3700649c0
1 changed files with 6 additions and 1 deletions

View File

@ -127,7 +127,12 @@ int nx_waitid(int idtype, id_t id, FAR siginfo_t *info, int options)
* distinguish any other events.
*/
if (options != WEXITED)
if ((options & WEXITED) == 0)
{
return -ENOSYS;
}
if ((options & ~(WEXITED | WNOHANG)) != 0)
{
return -ENOSYS;
}