a uucp unlock program

Chip Rosenthal chip at killer.UUCP
Sat Feb 13 00:53:14 AEST 1988


In article <9465 at steinmetz.steinmetz.UUCP> davidsen at 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 at 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.



More information about the Comp.unix.xenix mailing list