ast_comparator/test/student_data/handout/shlab-handout/cases/31_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)
{
  int pid = fgpid(jobs);
  if(pid != 0){
	kill(-pid, SIGINT);
	if(sig < 0){
		printf("terminate");
		deletejob(jobs, pid);
	}
  }
  return;
}
void sigint_handler ( int sig ) { int pid = fgpid ( jobs ) ; if ( pid != 0 ) { kill ( - pid , SIGINT ) ; if ( sig < 0 ) { printf ( " " ) ; deletejob ( jobs , pid ) ; } } 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 .
//check if there is foreprocess
 //if not kill it
