Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int is_jid = ('%' == *argv[1]);
- int job_num = atoi(argv[1] + is_jid);
- struct job_t * job = (is_jid ? getjobjid(jobs, job_num) : getjobpid(jobs, job_num));
- /*if argv[0] is "bg"*/
- if(!strcmp(argv[0], "bg")) {
- if (job->state == ST)
- if (kill(job->pid, SIGCONT))
- unix_error("kill error: SIGCONT");
- }
- /*if argv[0] is fg*/
- else
- waitfg(fgpid(jobs));
- return;
Add Comment
Please, Sign In to add comment