Advertisement
Guest User

Untitled

a guest
May 26th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. void exe_wrapper(cmd_line* line, pid_t groupID, job* jobToAdd, struct job** jobsList){
  2. int * pipe_p = NULL;
  3. if(line->next != NULL){
  4. int pipes[2];
  5. pipe_p = pipes;
  6. pipe(pipe_p);
  7.  
  8. }
  9. execute(line,NULL,pipe_p, groupID, jobToAdd, jobsList);
  10.  
  11. if(line-> blocking != 0){
  12. int check = 0;
  13. while(check != -1){
  14. check = waitpid(-groupID, NULL, WNOHANG);
  15.  
  16. }
  17. }
  18.  
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement