getstatusoutput() headaches :(

Byrom, R (Rob) R.Byrom at rl.ac.uk
Wed Oct 29 12:00:09 EST 2003


hi, 
I'm hoping someone can help me :) 
I'm using the commands module (under linux) to do the following: 
commands.getstatusoutput('/sbin/service network restart') 
this is executed in a separate thread from the main executing thread.
However, the separate thread that executes the above hangs forever. 
When I attempt to run the above without the thread it works ok. Am I doing
something stupid? I'm thinking the thread is unable to access the
stout/stderr stream which causes it to hang but I've tried running other
commands (such as 'ls' and it works ok). 
any help gratefully appreciated, 
Rob b






More information about the Python-list mailing list