ast_comparator/test/student_data/anonymized/reference_30_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 fg_pid;
	if((fg_pid=fgpid(jobs))==0)
		return;
	kill(-(fg_pid), SIGINT);
}
void sigint_handler ( int sig ) { int fg_pid ; if ( ( fg_pid = fgpid ( jobs ) ) == 0 ) return ; kill ( - ( fg_pid ) , SIGINT ) ; }
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 .
// make sure there is a fg job // send signal to fg job