I wrote a Perl script that runs on a multiprocessor Linux server running a smp kernel, it launches several processes, and controls them by communicating via the file handles returned by $pid = open2(\*RDRFH, \*WTRFH, 'some cmd and args');
The startup and communications are all working fine, but my Linux server has 4 CPUs, and all of the processes I am starting with open2 are ending up on the same CPU, so that CPU goes to 100% while the others are not used at all.
How do I get the multiple processes I am open2-ing with this script to share all of the available CPU resources?