Not cleaning up properly on exit.
Leaving the interface stuck on monitor mode when exiting. Leaving the temp file out there. There should be some way to cleanup on exit.
override the shutdown method! https://github.com/MycroftAI/mycroft-core/blob/dev/mycroft/skills/core.py#L1296
Hey @JarbasAl , I tried using the shutdown method and it doesn't seem to handle the particular cases I am playing around with. The two cases are:
- Changing a skill while mycroft is running. This appears to cause the skill to be reloaded. Shutdown doesn't seem to be called in this case.
- Control-Cing out of running mycroft in debug mode.
There is a chance I am misunderstanding the use of shutdown(), but when I grep around other skills using it, it seems to be the same way I am attempting to use it.
I am, for now, settling on using the del() for cleanup. However, this only seems to be helpful for the first case.
you can disable skill reloading https://github.com/MycroftAI/mycroft-core/blob/dev/mycroft/skills/core.py#L377 , but i think skill reloading will also call the shutdown method, i might be wrong though
ctrl+c should call shutdown for every skill, however if you are anything like me and kill the process / ctrl+c twice there is no clean way around that...
Hey @JarbasAl , You appear to be correct. I made sure I single ctrl+c'ed it, and it behaved as it should have. I have switched the code over for now to make it behave a little more standard.
However, there appears to still be an issue with removing the pcap file (which would be owned by root). I will keep this open until I figure out what to do here. I want to avoid additional sudo commands if possible.