How to list all Child Processes of an Applikation

In my Ruby Applikation I start a windows-batch-script which then starts
apache tomcat.

As i need the output of that programm i run it with "IO.popen(cmd)"

Problems occur, when i now try to stop or kill that tomcat again.

Is there any method of getting the pids of the child processes of an
applikation?
i then could get the pid of the shell and with that the pid of the
tomcat applikation.

Thanks in advance

···

--
Posted via http://www.ruby-forum.com/.

Ok i can get the pid of the child with:

io = popen(...)
pid = io.pid

But how do i get the pid of the grandchilds?

···

--
Posted via http://www.ruby-forum.com/.