Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.17 KB | None | 0 0
  1. if( pid == 0 ) {
  2.     execvp(progr, argv);
  3.     perror("Error executing");
  4.     return;
  5. } else if( pid < 0 ) {
  6.     perror("vFork error");
  7.     return;
  8. } else {
  9.     waitpid(pid, NULL, 0);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement