En Wed, 07 Feb 2007 16:50:55 -0300, <[EMAIL PROTECTED]> escribió: >> import subprocess >> child1 = subprocess.Popen(["./TestTool"], cwd="/home") >> child2 = subprocess.Popen(["sh","run.sh","load.xml"], cwd="/usr") >> >> Popen objects have a pid attribute. You don't have to use os.system to >> kill them; use os.kill instead. >> You'll notice that I leave out the final &, because I don't know how to >> start a background process without using the shell. But I think you can >> use: bg [pid], afterwards, to get the same result. > > thx for the reply > os.kill worked fine for the first process.. for the second one the > kill managed to kill the shell but the application is still running..
Don't use the shell, if possible, and replace whatever run.sh does with python code. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list