ast_comparator/test/student_data/handout/shlab-handout/cases/reference_28_tsh.c
/* 
 * waitfg - Block until process pid is no longer the foreground process
 */
Block until process pid is no longer the foreground process
Block until process pid is no longer the foreground process
void waitfg(pid_t pid)
{
  while (fgpid(jobs) == pid) {
    sleep(1);
  }
}
void waitfg ( pid_t pid ) { while ( fgpid ( jobs ) == pid ) { sleep ( 1 ) ; } }
waitfg - Block until process pid is no longer the foreground process
waitfg - Block until process pid is no longer the foreground process