Bug 67240 - tiffcp exits with abnormal status upon success
tiffcp exits with abnormal status upon success
Product: Red Hat Linux
Classification: Retired
Component: libtiff (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Phil Knirsch
Depends On:
  Show dependency treegraph
Reported: 2002-06-21 10:27 EDT by Jay Berkenbilt
Modified: 2015-03-04 20:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-06-21 10:42:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
tiff file (847 bytes, image/tiff)
2002-06-21 10:27 EDT, Jay Berkenbilt
no flags Details
patch to tiffcp.c that repairs this problem (179 bytes, patch)
2002-06-21 10:40 EDT, Jay Berkenbilt
no flags Details | Diff
patch to be applied from /usr/src/redhat to extracted source rpm (1.38 KB, patch)
2002-06-21 10:42 EDT, Jay Berkenbilt
no flags Details | Diff

  None (edit)
Description Jay Berkenbilt 2002-06-21 10:27:08 EDT
Description of Problem:

tiffcp exits with error code 2 even when it succeeds.

Version-Release number of selected component (if applicable):


How Reproducible:

seemingly always

Steps to Reproduce:
1. tiffcp 1.tif 2.tif
2. echo $?

Actual Results:

tiffcp succeeds; 2.tif is valid.  echo $? results in "2"

Expected Results:

$? should be 0

Additional Information:
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.
Comment 1 Jay Berkenbilt 2002-06-21 10:27:49 EDT
Created attachment 62044 [details]
tiff file
Comment 2 Jay Berkenbilt 2002-06-21 10:39:09 EDT
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.
Comment 3 Jay Berkenbilt 2002-06-21 10:40:26 EDT
Created attachment 62045 [details]
patch to tiffcp.c that repairs this problem
Comment 4 Jay Berkenbilt 2002-06-21 10:42:25 EDT
Created attachment 62046 [details]
patch to be applied from /usr/src/redhat to extracted source rpm
Comment 5 Phil Knirsch 2002-06-25 10:15:56 EDT
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

Note You need to log in before you can comment on or make changes to this bug.