I don't know the answer to your question, but this article seems relevant: http://stackoverflow.com/questions/1235516/fork-in-multi-threaded-program.
If you just need some simple code to do 10 things at the same time, you might like Parallel::ForkManager. Example code looks something like this:
use Parallel::ForkManager; my $pm = new Parallel::ForkManager(10); foreach (1..10) { # Forks and returns the pid for the child: my $pid = $pm->start and next; &something_1(); $pm->finish; # Terminates the child process } $pm->wait_all_children;
-Matt
In reply to Re: problems with fork from thread
by DrManhattan
in thread problems with fork from thread
by cristi1979
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |