2014-02-22, 21:09
(2014-02-22, 20:19)metheos Wrote:(2014-02-21, 02:02)metheos Wrote: Great add on! It does what I needed just fine. My only nitpick is that the script I put into the xbmc start option gets abandoned after exiting and shows up on the process list as a zombie! Not a big deal, but it would be nice if that didn't happen.
I was able to get this to work by adding a wait to the process and pointing it to a script that forks the actual script.
Code:class Main:
def __init__(self):
self._init_vars()
self._init_property()
global script_xbmc_starts
if script_xbmc_starts:
log('Going to execute script = "' + script_xbmc_starts + '"')
try:
process= subprocess.Popen([script_xbmc_starts])
process.wait()
except:
log('Error executing script when xbmc starts')
self._daemon()
Thanks for this, to be honest it does not happen in my setup (raspbmc) but I will investigate further. Regards,