fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int i;
  5. for(i=0;i<2;i++){
  6. if(fork()==0){
  7. printf("hello\n");
  8. }
  9. }
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 5388KB
stdin
Standard input is empty
stdout
hello
hello
hello
hello