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

Specify return code when build interrupted. #452

Merged
merged 2 commits into from
Apr 13, 2017

Conversation

mikepurvis
Copy link
Member

@mikepurvis mikepurvis commented Apr 13, 2017

The main alternative here might be to return errno.EINTR, which evaluates to 4 on at least Linux and OS X. However, interrupting other common command line utilities on both platforms seems to always yield a 130:

$ find /
.
.
.
^C
$ echo $?
130

Same with cat:

$ cat
^C
$ echo $?
130

Copy link
Member

@wjwwood wjwwood left a comment

Choose a reason for hiding this comment

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

Why is this needed or more appropriate than the current behavior?

@@ -576,6 +576,8 @@ def build_isolated_workspace(
except KeyboardInterrupt:
wide_log("[build] Interrupted by user!")
event_queue.put(None)

Copy link
Member

Choose a reason for hiding this comment

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

Trailing whitespace here I think.

@wjwwood
Copy link
Member

wjwwood commented Apr 13, 2017

Sorry, didn't notice you added a description after the fact.

@wjwwood
Copy link
Member

wjwwood commented Apr 13, 2017

Why not just 1? Shouldn't any non-zero code work?

@mikepurvis
Copy link
Member Author

Could be 1, totally. I was just curious if there was a convention among other tools about what to do, and it seems there is, so I followed it.

@wjwwood
Copy link
Member

wjwwood commented Apr 13, 2017

130 is fine by me.

@mikepurvis
Copy link
Member Author

👍

@wjwwood wjwwood merged commit 319846a into catkin:master Apr 13, 2017
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.

2 participants