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

Return a non-zero exit status code on error #156

Open
pacien opened this issue Dec 4, 2020 · 0 comments
Open

Return a non-zero exit status code on error #156

pacien opened this issue Dec 4, 2020 · 0 comments

Comments

@pacien
Copy link
Contributor

pacien commented Dec 4, 2020

r2e should return a non-zero exit when something wrong happens.

Currently, this only seems to be the case when it cannot parse its command line arguments.
For other kinds of failures already logged as "errors", the program still seems to exit with status code 0.

Because of this, failures go undetected when running the program through a cron job or systemd timer:

Dec 04 11:49:46 h systemd[1]: Starting rss2email-notifier.service...
Dec 04 11:49:49 h r2e[16099]: 2020-12-04 11:49:49,357 [ERROR]
Dec 04 11:49:49 h r2e[16099]: 2020-12-04 11:49:49,357 [ERROR] cause: sendmail exited with code 69
[...]
Dec 04 11:50:19 h r2e[16099]: 2020-12-04 11:50:19,126 [ERROR]
Dec 04 11:50:19 h r2e[16099]: 2020-12-04 11:50:19,126 [ERROR] cause: sendmail exited with code 69
Dec 04 11:50:19 h systemd[1]: rss2email-notifier.service: Succeeded.
Dec 04 11:50:19 h systemd[1]: Finished rss2email-notifier.service.
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