Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void exe_wrapper(cmd_line* line, pid_t groupID, job* jobToAdd, struct job** jobsList){
- int * pipe_p = NULL;
- if(line->next != NULL){
- int pipes[2];
- pipe_p = pipes;
- pipe(pipe_p);
- }
- execute(line,NULL,pipe_p, groupID, jobToAdd, jobsList);
- if(line-> blocking != 0){
- int check = 0;
- while(check != -1){
- check = waitpid(-groupID, NULL, WNOHANG);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement