Gracefully ending a script when XBMC exits
#1
Is there a way from within a script to detect that XBMC is closing, and have it run some cleanup? Catching a signal would be the best way to go.

I have a script that listens on a socket. If I us a blocking read, the script hangs when there is no data on the socket, and prevents XBMC from closing.

I've change to timeout after 2 seconds of no data, so the script doesn't really hang anymore, but that's not a real graceful fix. Also, I see a "script error" logged when XBMC exits.

Thanks!
Brian
Reply

Logout Mark Read Team Forum Stats Members Help
Gracefully ending a script when XBMC exits0