Please check the manual page wait4(2).