computer-system/CMU15-213/labs/LAB5_tshlab/tsh.c
int deletejob(struct job_t *jobs, pid_t pid) {
    int i;

    if (pid < 1)
	    return 0;

    for (i = 0; i < MAXJOBS; i++) {
        if (jobs[i].pid == pid) {
            clearjob(&jobs[i]);
            nextjid = maxjid(jobs)+1;
            return 1;
        }
    }
    return 0;
}
/* deletejob - Delete a job whose PID=pid from the job list */
Delete a job whose PID=pid from the job list
Delete a job whose PID = pid from the job list
int deletejob(struct job_t *jobs, pid_t pid) {
    int i;
    if (pid < 1)
	    return 0;
    for (i = 0; i < MAXJOBS; i++) {
        if (jobs[i].pid == pid) {
            clearjob(&jobs[i]);
            nextjid = maxjid(jobs)+1;
            return 1;
        }
    }
    return 0;
}
int deletejob ( struct job_t * jobs , pid_t pid ) { int i ; if ( pid < 1 ) return 0 ; for ( i = 0 ; i < MAXJOBS ; i ++ ) { if ( jobs [ i ] . pid == pid ) { clearjob ( & jobs [ i ] ) ; nextjid = maxjid ( jobs ) + 1 ; return 1 ; } } return 0 ; }
deletejob - Delete a job whose PID=pid from the job list
deletejob - Delete a job whose PID = pid from the job list