home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!soda.berkeley.edu!achoi
- From: achoi@soda.berkeley.edu (Andrew Choi)
- Newsgroups: comp.unix.programmer
- Subject: How to Detect being fingered on NFS?
- Date: 5 Nov 1992 22:27:19 GMT
- Organization: U.C. Berkeley, CS Undergraduate Association
- Lines: 38
- Distribution: world
- Message-ID: <1dc747INNdcu@agate.berkeley.edu>
- NNTP-Posting-Host: soda.berkeley.edu
-
- OK, this is not yet another "used a named pipe for your .plan"
- article, so, please don't jump into conclusion immediately.
-
- Here's the problem. I can be fingered at one of the serveral
- machines, i.e. "apple", "orange", "grape" ... etc. for the sake
- of argument. Note that everything under my home directory is
- NFS-mounted (this includes my .plan).
-
- If I have a process running on "apple" writing to my named pipe,
- it will detect if someone fingers me on "apple". However, if
- someone fingers "orange", it will just hang forever because
- NFS does not really recognize named pipe and so the write from
- process at "apple" does not respond to a read from "orange".
-
- There are several solutions to this problem:
-
- 1) Have processes running on all the machines, and have a
- shared file recording the date and time I was fingered
- so that all process can read and modify this file to update
- change (this needs locking, of course).
-
- 2) Have a process which periodically checks the last access time
- for my ".plan". If the last access time has been changed,
- assume that I am fingered and modify ".plan" accordingly.
-
- The latter approach is the one I am using now. I am just wondering
- if there is a better way to solve this problem that I don't see.
-
- One of the problem with the last approach is that it won't be
- accurate, i.e., fingered several times between last check, and
- I don't want to make it check too frequently (like once a second)
- because that's too expensive.
-
- Any ideas? Anyway to have an accurate but yet non-polling approach?
-
- -- Andrew Choi
-
-
-