[PATCH v2 21/32] tools/nolibc: implement waitpid() in terms of waitid()