Bug 238761 - /usr/bin/dvipdft always bails out with 'exit 1'.
/usr/bin/dvipdft always bails out with 'exit 1'.
Product: Fedora
Classification: Fedora
Component: tetex (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Jindrich Novy
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2007-05-02 16:17 EDT by Michal Jaegermann
Modified: 2013-07-02 19:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-05-04 07:27:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2007-05-02 16:17:11 EDT
Description of problem:

The script in question has on line 34

tmpdir=`mktemp -d ${TMP-/tmp}/$progname.XXXXXX`

So far so good but starting with line 94 there is this:

     94 mkdir "$tmpdir" || {
     95   echo "$progname: failed to create temp directory." >&2
     96   exit 1
     97 }

and that obviously terminates as "$tmpdir" already exists created
by 'mktemp'.  For an added attraction it also leaves behind "$tmpdir"
as a regular exit is not trapped.

There four lines are preceded by a comment
# before we create the tmpdir, set trap for cleanup
followed by a corresponding 'trap' statement (which traps only
some signals).

Replacing on line 94 'mkdir' with 'mkdir -p' makes this script
to work but clearly  "$tmpdir" creation was supposed to happen
after that 'trap' and not much earlier.  The breakage looks
like a result of some "fix" for an unsafe making of "$tmpdir".

Version-Release number of selected component (if applicable):
tetex-3.0-39.fc7 and earlier too
Comment 1 Jindrich Novy 2007-05-04 07:27:29 EDT
Should be fixed in rawhide. Thanks.

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