This was originally reported in March 13, 2003 as bug # 61105. It was fixed as recommended in rawhide and closed. Subsequently, the fix disappeared. The problem still/again exists. Reported against man-1.5o1-7 from FC3 errata, but I'm sure present before that, probably ever since RHL 7.2. ---------------------------------------- Description of Problem: If running /usr/bin/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/sin/makewhatis 2. Let it run for a few seconds, then control-c. Actual Results: makewhatis does not exit. It continues running but with its temp file deleted. Expected Results: makewhatis should exit. The temp files should be deleted. This is what happens with the change I suggest above.
Thank you for your notice. It was be fixed (in man-1.5p-2). Ivana Varekova
A better way of handling the traps would be as follows: trap "rm -rf $TMPFILEDIR" 0 trap "exit 255" 1 2 3 15 That way, you don't force a 255 exit code when the program would otherwise exit normally. The rm command will be run whenever the script exits, whether a normal exit or the exit resulting from the trap placed on the four signals above.
You are right your solvation is better, I change it in new version (1.5p-6). Thank you for your notice. Ivana Varekova