Path: utzoo!utgpu!water!watmath!clyde!burl!codas!killer!chip From: chip@killer.UUCP (Chip Rosenthal) Newsgroups: comp.unix.xenix Subject: Re: a uucp unlock program Keywords: uucico, unlock Message-ID: <3289@killer.UUCP> Date: 12 Feb 88 14:53:14 GMT References: <9465@steinmetz.steinmetz.UUCP> Reply-To: chip@killer.UUCP (Chip Rosenthal) Organization: The Unix(R) Connection BBS, Dallas, Tx Lines: 21 In article <9465@steinmetz.steinmetz.UUCP> davidsen@steinmetz.steinmetz.UUCP (William E. Davidsen Jr) writes: > >Some systems to which I connect have a habit of doing a wierd disconnect >which leaves the lock (LCK..) files in /usr/spool/uucp... > >X if ((kstat = kill (pid, 0)) == 0 || errno != ESRCH) >X continue; >X unlink (argv[argnum]); As long as you are fixing this problem, there is another one you could fix at the same time. It LCK.XQT is old, uuxqt will assume it is stale and remove it. If you have a uuxqt which has been merrily unbatching news for an hour or two, you will now have two uuxqt's running. I implemented a similar thing with a shell script (using od to read the pid from the lockfile). If the kill works, the lockfile is touched to avoid that problem. But, in any case, a lock cleaner upper has proved invaluable. -- Chip Rosenthal chip@vector.UUCP | But if you want to sing the Dallas Semiconductor (214) 450-0400 | blues, then boy you better {texsun,codas,ihnp4}!killer!vector!chip | learn how to lose.