]> arthur.barton.de Git - ngircd.git/commit
Enhance handling of command line errors, and "--help" & "--version"
authorAlexander Barton <alex@barton.de>
Tue, 31 Dec 2019 15:34:23 +0000 (16:34 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 31 Dec 2019 15:34:23 +0000 (16:34 +0100)
commit22cae1b5fc6779a1d74a5ca10ba6c8af45028e98
tree3ece631d3c54800806d072fb0b28e101c1d97f9f
parentfb5aa8f65213e97816fc16c2b794e030e0bd6da6
Enhance handling of command line errors, and "--help" & "--version"

Return with exit code 0 ("no error") when "--help" or "--version" was
used (this resulted in exit code 1, "error" before).

And exit with code 2 ("command line error") for all invalid command
line options, and show the error message on stderr (message was printed
to stdout before, and exit code was 1, "generic error").

This new behaviour is more in line with the GNU "coding standards",
see <https://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html>.
src/ngircd/ngircd.c