SHARE
TWEET

Untitled

a guest Apr 21st, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <unistd.h>
  2.  
  3. void recursion(int n) {
  4.     if (n!=0){
  5.         if (fork() == 0) {
  6.             recursion(n-1);    
  7.         }
  8.     }
  9. }
  10.  
  11. int main() {
  12.     recursion(10);
  13.     while (1);
  14.     return 0;
  15. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top