fork download
  1. #include <stdio.h>
  2. #include <unistd.h>
  3.  
  4. int main() {
  5. int a = fork();
  6. int b = fork();
  7. if (a>0 && b>0) {
  8. int c = fork();
  9. if (c > 0 && b >0) {
  10. int d = fork();
  11. if (d == 0) {
  12. fork();
  13. fork();
  14. }
  15. }
  16.  
  17. } else {
  18. fork();
  19. fork();
  20. }
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
Standard output is empty