*cabe logging?

Fairlight fairlite at fairlite.com
Tue Jun 14 13:53:02 PDT 2005


Simon--er, no...it was Tim Fischer--said:
> 
> Is there a way to log when someone opens *cabe and when they save it?  
> Is there anyway to activate some kind of "checkout" policy with *cabe so 
> that no 2 people can edit the same processing table?  If no to 
> both/either of these, is this a planned addition?

It doesn't do it itself, but you could rename it and stick it inside a
wrapper.  The wrapper would just log the username, date, time, and tty
of the person using it and log which table was being worked on, open
a semaphore file, and try to flock() it.  If it can get a lock on the
semaphore for *cabe on the requested file (ie, grab that from the command
line arguments as well), then it goes ahead and launches the real *cabe,
since renamed.  On exit from the real *cabe, clear down the lock and exit,
optionally perhaps logging the end time of use for easy reading if you
wanted.

It would probably be best to use non-blocking flock() so that you can
bail programmatically after too long a time without having to hit INTR or
similar.

This is pretty trivial stuff to do.

mark->
-- 
             Fairlight - Being intelligent, so you don't have to!
         Egotist extraordinaire, and Keeper of the One True Way[tm].
                                    ***
I'm a right bastard.  However, this works out fine because Life's a bitch,
and thus we get on splendidly.


More information about the Filepro-list mailing list