in reply to Re: strange behaviour when forking lots of times
in thread strange behaviour when forking lots of times

No, it forks about 2**11 processes. The first time through the loop, it forks once, creating two processes that each have 9 items left to do. The next time, the 2 processes become 4 that each have 8 items left to do. Then 4 become 8 that each have 7 items left to do... For a total of 2*(2**$N-1). And the whole run takes a fraction of second. (:

- tye        

  • Comment on Re^2: strange behaviour when forking lots of times (1<<$N)