Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not cleaning up properly on exit. #3

Open
JonStratton opened this issue Jul 14, 2018 · 4 comments
Open

Not cleaning up properly on exit. #3

JonStratton opened this issue Jul 14, 2018 · 4 comments

Comments

@JonStratton
Copy link
Owner

Leaving the interface stuck on monitor mode when exiting. Leaving the temp file out there. There should be some way to cleanup on exit.

@JarbasAl
Copy link

@JonStratton
Copy link
Owner Author

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:

  1. 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.
  2. 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.

@JarbasAl
Copy link

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...

JonStratton added a commit that referenced this issue Jan 23, 2019
…little more standard. However, there are still issues cleaning up the pcap file due to permissions

Also modified the way the pcap file is to be cleaned up. This also doesnt fix the issue, but refactors the code around the file name generation to allow deletes of the pcap file if monitor mode is interupted before a handshake is captured.
@JonStratton
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants