ast_comparator/test/student_data/handout/shlab-handout/cases/53_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 foreground_process = get_current_fg_pid(jobs);
	if (foreground_process != 0)
		if(kill(-foreground_process, SIGINT) == -1)
			unix_error("Sending signal failed");
}
void sigint_handler ( int sig ) { pid_t foreground_process = get_current_fg_pid ( jobs ) ; if ( foreground_process != 0 ) if ( kill ( - foreground_process , SIGINT ) == -1 ) unix_error ( " " ) ; }
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 .