You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2007/08/09 15:09:01 UTC
[Bug 5588] New: sa-update returns a non-zero exit code in normal circumstances
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5588
Summary: sa-update returns a non-zero exit code in normal
circumstances
Product: Spamassassin
Version: 3.1.7
Platform: All
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: sa-update
AssignedTo: dev@spamassassin.apache.org
ReportedBy: trevor@caira.com
sa-update's default return value is 1, which signifies no updates were made.
However, non-zero return codes are designated for error conditions, and not
updating is a normal condition.
Consider the use case where someone might run a daily cron job which runs
sa-update. They will then receive an email every day indicating that that cron
job failed, since it returns an non-zero exit code.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5588] sa-update returns a non-zero exit code in normal circumstances
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5588
jm@jmason.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
------- Additional Comments From jm@jmason.org 2007-08-09 07:12 -------
just consider "no updates available" to be an error condition, and you're fine ;)
cron job fix: use this command:
sa-update || true
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 5588] sa-update returns a non-zero exit code in normal circumstances
Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5588
------- Additional Comments From trevor@caira.com 2007-08-09 07:21 -------
This solution masks all other error conditions however. You would need a more
elaborate hack to work around this, such as creating a wrapper script like:
sa-update
rv=$?
[ $rv = 1 ] || exit $r
which of course is more complicated and hackish than simply respecting the
convention of 0 = normal return, !0 = error condition.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.