The proc-wait3 library adds the wait3, wait4, waitid, pause, sigsend, and getrusage methods to the Process module.
Daniel J. Berger
gem "proc-wait3", "~> 1.6.0"