🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #1976

trn (presumably rn) locking

#1976
From: Ian G Batten
Date: Tue, 11 Aug 1992 08:54
19 lines
1322 bytes
trn locks against multiple invocations of itself by writing the process
id into a file.  this allows it to detect stale locks (by seeing if the
process is still present).  the lock is written into the user's home
directory.

i have my home directory nfs mounted on several servers which i use
interchangably from my x terminal.  if i leave a copy of trn running in
one window, forget about it and then start a copy on another server, it
starts correctly because the pid on one machine is most likely not a
valid pid on another.

would it not be wise to write the hostname into the lock file and simply
refuse to start at all if that is not the local host?

unless anyone can think of a devasting reason why this is a bad idea, i
shall implement it.

ian
Technical Details
Message-ID: <BstA2s.Hy5@fulcrum.bt.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!sparky!uunet!mcsun!uknet!fulcrum!igb

Show Full Headers
Complete Article Headers
Message-ID: <BstA2s.Hy5@fulcrum.bt.co.uk>
Subject: trn (presumably rn) locking
Date: Tue, 11 Aug 1992 08:54:27 +0000
From: igb@fulcrum.bt.co.uk (Ian G Batten)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!sparky!uunet!mcsun!uknet!fulcrum!igb
Newsgroups: news.software.readers
Sender: news@fulcrum.bt.co.uk
Organization: Fulcrum Communications
Lines: 19