New answers tagged conventions
Your program should at least exit(3) EXIT_SUCCESS (i.e. 0) on success and probably EXIT_FAILURE (i.e. 1) on failure. You could copy (or be inspired by) FreeBSD sysexits.h for more failure codes (but I am not sure it is worth the effort). Don't forget to give some message to stderr (or thru syslog(3)) for any kind of failure. From what you describes, failing ...
Top 50 recent answers are included