Bug 61105 - makewhatis trap fails to exit
Summary: makewhatis trap fails to exit
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: man (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: i386 Linux
low
medium
Target Milestone: ---
Assignee: wdovlrrw
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-13 17:17 UTC by Dale Stimson
Modified: 2007-03-27 03:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-03-13 17:17:20 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 Dale Stimson 2002-03-13 17:17:16 UTC
Description of Problem:

If running /usr/sbin/makewhatis manually, an attempt to terminate
its operation via SIGINT does not exit.  Instead, it just deletes
temp files and continues executing.

The culprit is the statement at line 57:
    trap "rm -rf $TMPFILEDIR" 0 1 2 3 15

If that statement is changed to the following, all is well:
    trap "{ rm -rf $TMPFILEDIR ; exit 255 ; }" 0 1 2 3 15

Version-Release number of selected component (if applicable):
man-1.5i2-6

How Reproducible:
Always

Steps to Reproduce:
1. /usr/sbin/makewhatis
2. Let it run for a few seconds, then control-c.

Actual Results:
makewhatis does not exit.  It runs for a while longer and then
complains about missing temp files before finally exiting.

Expected Results:
makewhatis should exit.  The temp files should be deleted.
This is what happens with the change I suggested above.

Additional Information:

Comment 1 Bernhard Rosenkraenzer 2002-03-25 14:17:27 UTC
Right. Fixed in 1.5j-6.

Comment 2 Matthew Saltzman 2002-12-07 21:50:16 UTC
This fix apparently never made it into distribution, as it does not appear in
man-1.5j-6 (7.3) or man 1.5j-11 (8.0):

  # make sure TMPFILEDIR is deleted if program is killed or terminates
  # (just delete this line if your shell doesnt know about trap)
  trap "rm -rf $TMPFILEDIR" 0 1 2 3 15

The indicated failure to terminate on ^C also persists.



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