process synchronization

#include <sys/types.h>
#include <sys/wait.h>

int wait( int *status );
  • returns PID of child
  • status = exit status | NULL (if info is unnecessary)

Blocking for parent process until 1 chlid terminates.

Cleans up remainder of child system resources (those not removed on exit, kill zombies)