bytecodealliance/rustix

Please support rusage argument of waitid

joshtriplett opened this issue · 0 comments

On Linux, the waitid syscall has a fifth argument, a pointer to a struct rusage, which works like the corresponding parameter to wait3/wait4.

Please consider passing an appropriate buffer to this parameter, and putting the result into the opaque WaitidStatus struct, with a cfg(linux_kernel) function to return the rusage struct.

On linux_raw this should be easy (the implementation already has to pass this parameter). On the libc backend, this will require using syscall!.