pdfimages should returns exit code 2 when cannot open output files
This is the current behavior:
fer@dyckola:~$ pdfimages test-manuscript.pdf /dev/null/cannot-write-here/page-
I/O Error: Couldn't open image file '/dev/null/cannot-write-here/page--000.ppm'
fer@dyckola:~$ echo $?
0
But according to the man page it should be 2:
EXIT CODES
The Xpdf tools use the following exit codes:
0 No error.
1 Error opening a PDF file.
2 Error opening an output file.
3 Error related to PDF permissions.
99 Other error.