pastebin

Paste Search Dynamic
Recent pastes
childpid
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int fork();
  5.  
  6. int childpid = fork(); /* create a new process */
  7.  
  8. if(childpid) {
  9.         fork();
  10.         printf("An");
  11.  
  12.         }
  13.  else { /* child process */
  14.         fork();
  15.         printf("An");
  16.         /* Transform the child process to another program called Hello */
  17.         /* Note the many variations of exec that exist! */
  18.  
  19.         }
  20. printf("An");
  21. return 0;
  22. }
Parsed in 0.004 seconds