# How to list all Child Processes of an Applikation

**URL:** <https://www.ruby-forum.com/t/how-to-list-all-child-processes-of-an-applikation/116299>\
**Category:** Ruby\
**Created:** [October 4, 2007, 10:34am UTC](https://www.ruby-forum.com/t/how-to-list-all-child-processes-of-an-applikation/116299 "2007-10-04T10:34:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![janc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7bcc69/32.png) [@janc](https://www.ruby-forum.com/u/janc)\
**Post date:** [October 4, 2007, 10:34am UTC](https://www.ruby-forum.com/t/how-to-list-all-child-processes-of-an-applikation/116299/1 "2007-10-04T10:34:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![janc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7bcc69/32.png) [@janc](https://www.ruby-forum.com/u/janc)\
**Post date:** [October 4, 2007, 12:27pm UTC](https://www.ruby-forum.com/t/how-to-list-all-child-processes-of-an-applikation/116299/2 "2007-10-04T12:27:59Z")

</div>

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?
