ast_comparator/test/student_data/handout/shlab-handout/cases/58_tsh.c
void waitfg(pid_t pid)
{
  /* busy loop while waiting for SIGCHLD */
  while (pid==fgpid(jobs))
    sleep(1);
  return;
}
/*
 * 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 (pid==fgpid(jobs))
    sleep(1);
  return;
}
void waitfg ( pid_t pid ) { while ( pid == fgpid ( jobs ) ) sleep ( 1 ) ; return ; }
waitfg - Block until process pid is no longer the foreground process
waitfg - Block until process pid is no longer the foreground process
/* busy loop while waiting for SIGCHLD */