Bug 8947 - bogus locking mechanism used in redhat scripts
Summary: bogus locking mechanism used in redhat scripts
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: man
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-28 20:33 UTC by Stig Hackvan
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-02-03 14:36:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Stig Hackvan 2000-01-28 20:33:25 UTC
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 14:36:59 UTC
Thanks, fixed.


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