ast_comparator/test/student_data/anonymized/reference_17_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) 
{
    int pid = 0;
    int jid = 0;
    pid = fgpid(job_list);
    jid = pid2jid(pid);
    if (pid == 0) return;
    if (kill(-pid, sig) < 0) {
        unix_error("sigtstp_handler: can't send SIGSTP to the child");
    }
    return;
}
void sigtstp_handler ( int sig ) { int pid = 0 ; int jid = 0 ; pid = fgpid ( job_list ) ; jid = pid2jid ( pid ) ; if ( pid == 0 ) return ; if ( kill ( - pid , sig ) < 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 .