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

cannot kill a running task #4201

Closed
vigsterkr opened this issue Mar 8, 2018 · 4 comments
Closed

cannot kill a running task #4201

vigsterkr opened this issue Mar 8, 2018 · 4 comments

Comments

@vigsterkr
Copy link
Member

try any long running python example and try to ctrl-c.... only kill -9 <PID> works.

@geektoni
Copy link
Contributor

geektoni commented Mar 8, 2018

I think this may be caused by the premature stopping feature. I believe this line https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/base/init.cpp#L101 is causing the problem you are running into. I'll have a closer look later today.

@vigsterkr
Copy link
Member Author

@geektoni so i'm guessing the reason it is currently not doing anything is because of this:
https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/lib/Signal.cpp#L17

since in the handler:
https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/lib/Signal.cpp#L36

do you know why it is by default turned off? :)

@geektoni
Copy link
Contributor

I think we wanted to let the user decide what behaviour Ctrl+C to use. In fact, here https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/lib/Signal.h#L76 there is the method to enable the custom signal handler.

Anyway, this line https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/lib/Signal.cpp#L37 is clearly wrong, it should have an exit call instead of return. I'll provide a patch to fix that. Shall I also change the behaviour of the signal handler to be always active?

@vigsterkr
Copy link
Member Author

@geektoni i would rather have it by default active as currently if you run a model and wanna cancel it the only way to do is to kill the process :) which is not the most user friendly behaviour :P

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

No branches or pull requests

2 participants