fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. for(int i=0; i<3; i++)
  6. {
  7. fork();
  8. }
  9. int e = wait(NULL);
  10. printf("The created processes are finished %d\n", e);
  11.  
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0.01s 5436KB
stdin
Standard input is empty
stdout
The created processes are finished -1
The created processes are finished 15141