Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sigchld_handler(int sig)
- {
- pid_t pid;
- int status;
- struct job_t *job;//using job struct
- while((pid = waitpid(-1, &status, WNOHANG)) > 0)//WNOHANG doesn't wait for process
- {
- //job = getjobpid(jobs, pid);
- deletejob(jobs, pid);//deletes job after termination
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement