in reply to Re^5: DBI and fork() on Win32
in thread DBI and fork() on Win32

This will only start up to 63 child processes before system(1, ...) will start failing.

You could either capture the return value of the system(1, ...) call, which is a PID, or more generally just use the sample code from the waitpid() documentation before calling system(1, ...) to reap all zombie processes.

This is necessary because Perl keeps these PIDs together with the PIDs returned by the fork() emulation in a single table that has a limit of 63 entries. This somewhat arbitrary number comes from the WaitForMultipleObjects() Windows API that is used in the implementation of wait().

Replies are listed 'Best First'.
Re^7: DBI and fork() on Win32
by FloydATC (Deacon) on Feb 10, 2009 at 21:42 UTC
    Yup after the not-so-subtle hint in the direction of perlport I read up on this ugly thing that is system(1, ...) and figured as much. Thanks :-)