Please check the manual page wait(2).