Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<sys/types.h>
- #include<stdio.h>
- #include<unistd.h>
- int main(void){
- pid_t x,y;
- fork();
- printf("A-Process ID : %d\n",getpid());
- printf("B-Process ID : %d\n",getpid());
- fork();
- printf("C-Process ID : %d\n",getpid());
- printf("D-Process ID : %d\n\n",getpid());
- sleep(50);
- return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement