Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <signal.h>
- #include <unistd.h>
- #include <sys/types.h>
- #include <sys/errno.h>
- int main()
- {
- int x;
- for(x; x<3; x++)
- {
- switch (fork())
- {
- case -1:
- perror("fork error");
- exit(1);
- case 0:
- execl("prog1.x", "prog1.x", NULL);
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment