computer-system/CMU15-213/labs/LAB5_tshlab/tsh.c
int pid2jid(pid_t pid) {
    int i;

    if (pid < 1)
	    return 0;
    for (i = 0; i < MAXJOBS; i++)
        if (jobs[i].pid == pid) {
            return jobs[i].jid;
        }
    return 0;
}
/* pid2jid - Map process ID to job ID */
Map process ID to job ID
Map process ID to job ID
int pid2jid(pid_t pid) {
    int i;
    if (pid < 1)
	    return 0;
    for (i = 0; i < MAXJOBS; i++)
        if (jobs[i].pid == pid) {
            return jobs[i].jid;
        }
    return 0;
}
int pid2jid ( pid_t pid ) { int i ; if ( pid < 1 ) return 0 ; for ( i = 0 ; i < MAXJOBS ; i ++ ) if ( jobs [ i ] . pid == pid ) { return jobs [ i ] . jid ; } return 0 ; }
pid2jid - Map process ID to job ID
pid2jid - Map process ID to job ID