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

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