computer-system/CMU15-213/labs/LAB5_tshlab/tsh.c
void sigtstp_handler(int sig) {
    int olderrno = errno;

    pid_t pid;
    if((pid = fgpid(jobs)) > 0) {
        Kill(-pid, SIGTSTP);
    }
    errno = olderrno;
    return;
}
/*
 * 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 olderrno = errno;
    pid_t pid;
    if((pid = fgpid(jobs)) > 0) {
        Kill(-pid, SIGTSTP);
    }
    errno = olderrno;
    return;
}
void sigtstp_handler ( int sig ) { int olderrno = errno ; pid_t pid ; if ( ( pid = fgpid ( jobs ) ) > 0 ) { Kill ( - pid , SIGTSTP ) ; } errno = olderrno ; 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 .