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

Clean Ctrl-C exit from monitor. #2763

Merged
merged 1 commit into from
Aug 23, 2018

Conversation

hjoliver
Copy link
Member

Close #2762

@hjoliver
Copy link
Member Author

(Not too taxing a review job :-)

@matthewrmshin matthewrmshin added this to the next release milestone Aug 23, 2018
@matthewrmshin
Copy link
Contributor

matthewrmshin commented Aug 23, 2018

Just wondering... What do we want the exit code to be? I guess cylc monitor is designed to exit via KeyboardInterrupt. In which case, the behaviour here is correct - simply exit (return 0). Do we want to print out a KeyboardInterrupt message to sys.stderr to inform the user that cylc monitor is killed normally? (Or maybe it does not matter.)

tail -f ... returns non-zero on Ctrl-C. And it prints Ctrl-C.
watch ... returns zero on Ctrl-C and does not print anything.

So there is no correct or incorrect behaviour, I suppose.

@hjoliver
Copy link
Member Author

IMO exit 0 is fine in this case. And this does leave "^C" visible at exit (in my environment at least).

Copy link
Collaborator

@sadielbartholomew sadielbartholomew left a comment

Choose a reason for hiding this comment

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

Works 'cleanly' as described. N.b. '^C' is also visible after Ctrl-C in my environment, implying standard exit.

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.

3 participants