Red Hat Bugzilla – Bug 67240
tiffcp exits with abnormal status upon success
Last modified: 2015-03-04 20:10:52 EST
Description of Problem:
tiffcp exits with error code 2 even when it succeeds.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. tiffcp 1.tif 2.tif
2. echo $?
tiffcp succeeds; 2.tif is valid. echo $? results in "2"
$? should be 0
This was not broken in RedHat 7.1 or 7.2.
I consider the severity "high" because this makes it very hard to use tiffcp in
scripts reliably. There's no good workaround. A bad workaround is to make sure
tiffcp didn't generate any output, but that's not really reliable.
Just in case, I'm attaching my 1.tif file, though I have had this problem with
every tiff file I've looked at.
Created attachment 62044 [details]
I'm attaching two patches: one to tiffcp.c that fixes the problem (which is just
failure to return 0 from the end of main), and one that can be applied from
/usr/src/redhat after installing the source RPM. The second patch modifies the
spec file and creates the new diff. The first patch is embedded in it. I've
changed the rpm release to 2.1. You would no doubt want to change it to 3 or
whatever is current.
Created attachment 62045 [details]
patch to tiffcp.c that repairs this problem
Created attachment 62046 [details]
patch to be applied from /usr/src/redhat to extracted source rpm
Thanks for the very detailed bug report and the actual patch to fix the problem.
Your patch is included in the latest rawhide build of libtiff-3.5.7-6.
Read ya, Phil