Note that wait() doesn't work since only waiting for specified pid is supported. wait() will just return -1 and set errno to ECHILD.