The Perl 5 module Proc::Wait3 provides wait3(2) system call support.