jerpelea opened a new pull request, #20277:
URL: https://github.com/apache/nuttx/pull/20277
## Summary
Fix two waitid() bugs found during a code review of sched/sched:
Parent/child verification compared the child's tg_ppid against the
calling thread's pid (rtcb->pid) instead of its group pid, so any non-leader
thread waiting for a child of its own group always got ECHILD (sched_waitid.c
x2; same bug also fixed in sched_waitpid.c).
waitid() documented WNOWAIT as supported but always discarded the child
status entry, so WNOWAIT|WEXITED consumed the status and a subsequent real wait
failed with ECHILD. Now the entry is kept when WNOWAIT is set, matching
waitpid() behavior.
Also includes two small one-line fixes in the same area:
sched_setscheduler() now rejects a NULL param with -EINVAL instead of
dereferencing it, and cpuload_oneshot.c uses USEC_PER_SEC instead of a
hardcoded 100000.
## Impact
RELEASE
## Testing
CI
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]