Process mgmt on both windows / linux within plugin
#1
Hi,

I'm trying to write a plugn that essentially launches an external command using subprocess popen function. I would like the ability to see if the process is running and kill it if necessary.

I know how to accomplish this if xbmc is running on linux (via kill / ps - grep), but how would you accomplish this such that it would also run on windows? What options do I have.

Thanks.
Reply
#2
Depending on what external process you're executing, you can check on whether or not the process you opened is running by using the Popen.poll() routine. You can kill it by using Popen.terminate(), Popen.send_signal() or obviously, Popen.kill(). This should work on both platforms.
Reply

Logout Mark Read Team Forum Stats Members Help
Process mgmt on both windows / linux within plugin0