I would like to call other Perl scripts in order to perform a contention test from with a main Perl script.
Something like this currently works:
system("perl 1.pl");
system("perl 2.pl");
exit;
However, I would like to kick these off as independent threads running at the same time.
I tried, based on my Google searches, doing something like this:
system(1, "perl 1.pl");
system(1, "perl 2.pl");
exit;
That doesn't work. The main script exists immediately, which is fine, but the underlying threads I want to spawn don't get kicked off. I was wondering if there was something else I have to do or if anyone else has done something like this.
Thanks for any help in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…