ast_comparator/test/student_data/handout/shlab-handout/cases/51_tsh.c
/*
 * 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 intpid = fgpid(jobs);
  if(intpid !=0) {
	if(killpg(getpgid(intpid), sig) < 0) 
      unix_error("SIGINT_HANDLER ERROR");
  }
  return;
}
void sigint_handler ( int sig ) { pid_t intpid = fgpid ( jobs ) ; if ( intpid != 0 ) { if ( killpg ( getpgid ( intpid ) , sig ) < 0 ) unix_error ( " " ) ; } 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 .
// send SIGINT signal to the process group and check if there was an error