Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
- int main()
- {
- if(fork() == 0) { // osierocenie
- printf("\nwlasne %d",getpid());
- printf("\nrodzica %d\n",getppid());
- exit(0);
- }
- printf("\nwlasne %d",getpid());
- printf("\nrodzica %d\n",getppid());
- return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement