in reply to Re^2: Opening multiple forking servers
in thread Opening multiple forking servers

Two things.

  1. I think you mean for your system call to be inside the foreach loop.
  2. Your prefork_server.pl never exits. It sits in the foreground and manages the children doing the work.

A simple way to get many servers would be to add '&' to the end of your $cmd. That way, the shell will fork and execute prefork_server.pl and return immediately (so you can then spawn the next prefork_server.pl).

Replies are listed 'Best First'.
Re^4: Opening multiple forking servers
by jalewis2 (Monk) on Mar 06, 2007 at 16:10 UTC
    I've updated the code with the system() in the loop, I was troubleshooting and forgot it was there when I posted.

    I've added & to try and background the process, but it still hangs on the first server.