diff --git a/sched/sched/sched_waitid.c b/sched/sched/sched_waitid.c index a03cbe2edb..b8fb630b9c 100644 --- a/sched/sched/sched_waitid.c +++ b/sched/sched/sched_waitid.c @@ -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; }