Catch quit blender event in addon Is there a way to catch the application quit event ?
We have a plugin that runs an xml rpc server and we would like to kill it upon application quit as it keeps running in the background after we quit the blender session.

Thank you,

-H.
one way could be by running Blender from the terminal and just add &amp;&amp; at the end.
NB. not sure on windows though havent try it myself.

mac:

cd /Applications/Blender
./blender.app/Contents/MacOS/blender &amp;&amp; do_something


linux:

cd &lt;blender installation directory&gt;
./blender &amp;&amp; do_something


windows

cd c:\&lt;blender installation directory&gt;
blender -and do_something


on unix based system the &amp;&amp; command does something if the command before has successful, so basically in this case only after you quit blender it will run the second command. on windows -and should probably do the same.

you could also probably catch it by launching blender inside python using the subprocess module. But haven't try that yet.