Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83 (MC840302); site diku.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!diku!storm
From: storm@diku.UUCP (Kim Fabricius Storm)
Newsgroups: net.bugs.uucp
Subject: Removal of LCK-files (not so easy)
Message-ID: <1044@diku.UUCP>
Date: Thu, 11-Jul-85 20:19:01 EDT
Article-I.D.: diku.1044
Posted: Thu Jul 11 20:19:01 1985
Date-Received: Sat, 13-Jul-85 12:10:20 EDT
References: <472@qantel.UUCP> <170@motel6.UUCP> <> <154@telesoft.UUCP> <696@lsuc.UUCP> <697@lsuc.UUCP>
Organization: DIKU, U of Copenhagen, DK
Lines: 16
Keywords: tip, uucp, LCK

In article <697@lsuc.UUCP> dave@lsuc.UUCP (David Sherman) writes:
>||Why not just write a simple set-UID program which removes
>||the LCK file and nothing else?
>                            You want this done automatically
>when tip exits. So move tip to /usr/lib and make tip a shell
>file which reads
>	trap '/usr/lib/cleanLCK' 0 1 2 3 9 15
>	/usr/lib/tip $*

The problem with this (and similar) 'solution' is that your /usr/lib/tip may
return immediately because the line is locked, and *OOPS* the lock is removed!

The same effect could just as well be obtained by the script (-:
	/usr/lib/cleanLCK	-- remove the lock if any
	/usr/lib/tip $*		-- then call tip.