ast_comparator/test/student_data/handout/shlab-handout/cases/prev_14_tsh.c
void sigint_handler(int sig)
{ //TODO6
  pid_t pid;
  pid = fgpid(jobs); // get the job running in the foregound

  if(pid != 0) { // terminate it.
    kill(-pid, SIGINT);
  }
  return;
}
/*
 * sigint_handler - The kernel sends a SIGINT to the shell whenver the
 *    user types ctrl-c at the keyboard.  Catch it and send it along
 *    to the foreground job.
 */
The kernel sends a SIGINT to the shell whenver the
user types ctrl-c at the keyboard.  Catch it and send it along
to the foreground job.
The kernel sends a SIGINT to the shell whenver the user types ctrl - c at the keyboard . Catch it and send it along to the foreground job .
void sigint_handler(int sig)
{ 
  pid_t pid;
  pid = fgpid(jobs); 
  if(pid != 0) { 
    kill(-pid, SIGINT);
  }
  return;
}
void sigint_handler ( int sig ) { pid_t pid ; pid = fgpid ( jobs ) ; if ( pid != 0 ) { kill ( - pid , SIGINT ) ; } return ; }
sigint_handler - The kernel sends a SIGINT to the shell whenver the
    user types ctrl-c at the keyboard.
sigint_handler - The kernel sends a SIGINT to the shell whenver the user types ctrl - c at the keyboard .
//TODO6 // get the job running in the foregound // terminate it.