ast_comparator/test/student_data/handout/shlab-handout/cases/63_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)
{
	if(verbose)
		printf("sigtstp_handler: entering\n");
	pid_t pid;
	if ((pid = fgpid(jobs))){
		if(kill(-pid, SIGTSTP) < 0){
			unix_error("kill error");
		}
	}
  return;
}
void sigtstp_handler ( int sig ) { if ( verbose ) printf ( " \n " ) ; pid_t pid ; if ( ( pid = fgpid ( jobs ) ) ) { if ( kill ( - pid , SIGTSTP ) < 0 ) { unix_error ( " " ) ; } } return ; }
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 .
// First retrieves the pid of the FG process and then send SIGTSTP to all processes in its group // Does nothing if no job is in the FG