Bug 8947 - bogus locking mechanism used in redhat scripts
bogus locking mechanism used in redhat scripts
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: man (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-28 15:33 EST by Stig Hackvan
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-03 09:36:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stig Hackvan 2000-01-28 15:33:25 EST
if makewhatis.cron is run by hand and ^C is pressed upon the generation of
an error message {"rec.1: no such file or directory" being the annoying on
ein 6.1} then a lock file gets left behind.  the patch below fixes this an
d probably ought to be applied elsewhere in cron*/*

i suspect that with no pid tied to the lockfile, that lots of users have
bogus lockfiles left behind from reboots and crashes.  either the locking
mechanism needs to be more robust or bogus locks need to get cleaned up...

	stig

--- makewhatis.cron~    Mon Sep 13 17:26:26 1999
+++ makewhatis.cron     Fri Jan 28 11:59:55 2000
@@ -7,7 +7,9 @@
 # them from stepping on each other's toes.  The worst that will
 # happen is that they will temporarily corrupt the database...
 [ -f $LOCKFILE ] && exit 0
+
+trap "rm $LOCKFILE" EXIT
 touch $LOCKFILE
+
 makewhatis -w
-rm -f $LOCKFILE
 exit 0
Comment 1 Bernhard Rosenkraenzer 2000-02-03 09:36:59 EST
Thanks, fixed.

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