ast_comparator/test/student_data/handout/shlab-handout/cases/53_tsh.c
/*
 * sigtstp_handler - The kernel sends a SIGTSTP to the shell whenever
 *     the user types ctrl-z at the keyboard. Catch it and suspend the
 *     foreground job by sending it a SIGTSTP.
 */
The kernel sends a SIGTSTP to the shell whenever
the user types ctrl-z at the keyboard. Catch it and suspend the
foreground job by sending it a SIGTSTP.
The kernel sends a SIGTSTP to the shell whenever the user types ctrl - z at the keyboard . Catch it and suspend the foreground job by sending it a SIGTSTP .
void sigtstp_handler(int sig)
{
	pid_t foreground_process = get_current_fg_pid(jobs);
	if (foreground_process != 0)
		if(kill(-foreground_process, SIGTSTP) == -1)
			unix_error("Sending signal failed");
}
void sigtstp_handler ( int sig ) { pid_t foreground_process = get_current_fg_pid ( jobs ) ; if ( foreground_process != 0 ) if ( kill ( - foreground_process , SIGTSTP ) == -1 ) unix_error ( " " ) ; }
sigtstp_handler - The kernel sends a SIGTSTP to the shell whenever
     the user types ctrl-z at the keyboard.
sigtstp_handler - The kernel sends a SIGTSTP to the shell whenever the user types ctrl - z at the keyboard .