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

Fix issue #4201. #4205

Merged
merged 1 commit into from Mar 13, 2018
Merged

Fix issue #4201. #4205

merged 1 commit into from Mar 13, 2018

Conversation

geektoni
Copy link
Contributor

@geektoni geektoni commented Mar 13, 2018

Enable Shogun's custom signal handler by default.
If the handler is not enabled, a SIGINT signal (Ctrl+C) will
kill the application.
if (!m_active)
return;
exit(-1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we sure we want exit(-1) ? i mean in this case of a REPL we would exit the REPL itself, or?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user won't enter into REPL loop if m_active is set to false. In such a situation, the handler won't ask the user any inputs, it will just terminate the execution and it won't print any message to the screen either. So I decided to maintain a consisten behaviour between the Shogun's handler and the standard system handler when dealing with a SIGINT: exit and set the exit code != 0.

@vigsterkr vigsterkr merged commit 499d189 into shogun-toolbox:develop Mar 13, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants