views:

32

answers:

1

I'm using a third party library that starts various sub processes. When there's an exception I'd like to kill all the child processes. How can I get a list of child pids?

+1  A: 

It's usually safer to log the pids of all your child processes when you create them. There isn't a posix compliant way to list child PIDs. I know this can be done with the PS tool.

Zac Bowling
Yeah, I expected that. The problem is it's not me creating the processes, it's the third party library. Oh well. It's not a showstopper.
Rowan
can I get an accept?
Zac Bowling