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

Stopping rig project theme with Control + C results in [ERROR] #93

Open
anniegreens opened this issue Oct 20, 2017 · 7 comments
Open

Stopping rig project theme with Control + C results in [ERROR] #93

anniegreens opened this issue Oct 20, 2017 · 7 comments

Comments

@anniegreens
Copy link

Since updating to rig 1.3.2 stopping a running theme with the usual Control + C does still stop, but also outputs the following error:

^C[ERROR] Error running project script 'theme': 130

Is there a more graceful way to stop this now or should this be expected?

@grayside
Copy link
Contributor

I've yet to find any change in the rig code that could affect this. However, it is possible the underlying script doesn't gracefully handle the termination signal and throws an error (with a code 130 to be specific).

If you do this:

rig project run cli
npm install && npm run setup && npm start
# Cntrl C
echo $#

Do you get the 130 exit code? If so, we either need to live with it, or npm start can be fancied up.

Cc @illepic

@anniegreens
Copy link
Author

@grayside I do not get the 130 exit code when running and ending it in that manner.

@anniegreens
Copy link
Author

anniegreens commented Oct 20, 2017

Aha but I do when I exit the cli:

--------------------------------------------------------
[BS] Serving files from: ./
[BS] Watching files...
^C
[root@d1333e257096 ahs_theme]# exit
exit
[ERROR] Error running project script 'run': 130

@grayside
Copy link
Contributor

Per http://www.tldp.org/LDP/abs/html/exitcodes.html, it seems that code 130 is the official exit code for processes terminated with exit code 130, and other research I've done indicates that Docker containers (and presumably rig project run) will set this status.

Given this my initial thought is we should wontfix, but if we can intercept it may be friendlier to change the message to, say [WARNING] User interrupted project script 'run': 130 to be a bit more clear. Does that seem reasonable?

@anniegreens
Copy link
Author

👍 I think that's an acceptable compromise and a warning/notice seems more appropriate.

@grayside
Copy link
Contributor

I'm having a hard time replicating this problem. In my environment if I hit Control C it immediately exits without a message. What shell are you using? Do you know if you have any special handling for signals?

@anniegreens
Copy link
Author

Yeah, I am using zsh with some default OhMYZSH settings. I'd have to dig and see if there are any signal handling, as I'm unsure of that.

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