in reply to strange behaviour when forking lots of times

It looks like you're running into some sort of resource limit and getting strange results. The perlfork doc says:

In the eyes of the operating system, pseudo-processes created via the fork() emulation are simply threads in the same process. This means that any process-level limits imposed by the operating system apply to all pseudo-processes taken together. This includes any limits imposed by the operating system on the number of open file, directory and socket handles, limits on disk space usage, limits on memory size, limits on CPU utilization etc.

  • Comment on Re: strange behaviour when forking lots of times

Replies are listed 'Best First'.
Re^2: strange behaviour when forking lots of times
by cool (Scribe) on May 16, 2006 at 18:18 UTC
    When I run
    perl -e 'fork || print for split (//, "a" x 10);'
    I get only 'a's not a single 1. Its Fedora core-3 with v5.8.5 of Perl
Re^2: strange behaviour when forking lots of times
by nothingmuch (Priest) on May 21, 2006 at 02:07 UTC

    It's important to note that perlfork discusses fork emulation, which is only relevant on Windows.

    -nuffin
    zz zZ Z Z #!perl