in reply to How to use multiple processors with fork in unix?

I've changed your code to read:
if (fork()==0) { print "child1\n"; system ("ls -al $ARGV[0]"); exit; } if (fork()==0) { print "child2\n"; system ("df -k $ARGV[1]"); exit; } wait; wait; print "Done!\n";
and it works fine. So your problem might be one or both of:
  1. The programs you call don't work as you think they should.
  2. You can't seperate the ouput by looking at it. The lines of output usually are mixed.