I had to deal with ~200 to ~400 processes that I would keep going all
the time. I would just do a wait, see which processes exited and
restart it.
The code would something look like:
...
pid = posix.fork()
if pid:
processes[`pid`] = ...
else:
...
...
pid, exitcode = posix.wait()
... = processes[`pid`]
What I did in the '...' is that I had a object that would manage a
process. You could start a process with arguments etc., or you could
restart (it would remember the arguments), or you wait for it
specifically, or you could kill it etc.
Good luck,
-Jaap-
-- Jaap Vermeulen +--------------------------+ | Sequent Computer Systems | Internet : jaap@sequent.com | Beaverton, Oregon | Uucp : ...uunet!sequent!jaap +--------------------------+