os.system() inside a thread problem
fredrik at pythonware.com
Sat Dec 11 16:15:44 CET 2004
Daniel Bernhardt wrote:
> my thread calls a program with os.system().
>> os.system("/usr/bin/wine /path/to/ultima/online.exe")
in the example you included, you use execv. which one is it?
> Ultima Online is starting and i can enter commands and navigate through the
> game with my keyboard. If I move the mouse over the Ultima Online window
> Ultima Online crashes. (the mouse just need to overlap 1 pixel of the egde
> of the window. titlebar inlcuded)
>> /usr/bin/wine: line 55: 11675 Segmentation fault
> Same with os.popen()
> If I run os.system() outside the thread everything is working like expected.
> Other programs (wine emulated and nativ) work inside and outside the thread.
> Can anyone tell me how I can fix this?
just curious: do you really have to use a thread? why not just do
os.system(command + "&")
More information about the Python-list