Reported in the Ubuntu bug tracker: For example "pdfinfo -v" should return the exit status 0 for success, but returns return status 99. Same with "pdfinfo -h", "pdfinfo -help", "pdfinfo --help", "pdfinfo -?", and "pdfinfo -listenc"
Sorry, forgot the link to the original bug report: https://bugs.launchpad.net/ubuntu/+source/poppler/+bug/618854
And why is this a bug? This is obviously on purpose.
¿on purpose? pdfinfo -v etc. are perfectly valid calls and should of course return the error code 0, the error code 99 is signalling "other error" according to the man page. I know of no other program returning an error code for successful actions like --help etc. A quick look at the code shows the reason for the bug: all cases showing the version and/or help information are lumped together. Some of them (invalid options) should return 99, others (asking for the version or help info) should not.
So you already looked at the code :-) What about attaching a patch? I'm busy doing "more important things" at the moment.
Created attachment 40966 [details] [review] Fixing the error code for help, version, and listenc info I didn't look at the code before you claimed it to be "on purpose" :-P But here you go, this patch should solve the issue.
Fixed for poppler 0.16.0
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.