How to get a PID of a child process from a process openden with Popen()

P

P.S.

Hello,

I am starting a GUI-application as another user with kdesu in my python
script:

import shlex, subprocess

p = subprocess.Popen(shlex.split("kdesu -u test program"))

How can I aquire the PID of the program which kdesu starts?
p.pid just returns the PID of kdesu, but I need the PID of the
child process from kdesu.

My System: openSUSE 11.4 64-Bit, Python 2.7.

Regards
Pedro Santos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top