use waitpid2 to get proccess exit status on mri