Advertisement
Guest User

Untitled

a guest
Jun 18th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <unistd.h>
  3. #include <stdlib.h>
  4.  
  5.  
  6. int main()
  7. {
  8. if(fork() == 0) { // osierocenie
  9.  
  10. printf("\nwlasne %d",getpid());
  11. printf("\nrodzica %d\n",getppid());
  12.  
  13. exit(0);
  14.  
  15. }
  16.  
  17. printf("\nwlasne %d",getpid());
  18. printf("\nrodzica %d\n",getppid());
  19. return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement