Bug 238761 - /usr/bin/dvipdft always bails out with 'exit 1'.
Summary: /usr/bin/dvipdft always bails out with 'exit 1'.
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tetex   
(Show other bugs)
Version: rawhide
Hardware: All Linux
medium
low
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-05-02 20:17 UTC by Michal Jaegermann
Modified: 2013-07-02 23:20 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Michal Jaegermann 2007-05-02 20:17:11 UTC
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 11:27:29 UTC
Should be fixed in rawhide. Thanks.


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