home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / pascal / 7851 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1.7 KB  |  39 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!mcsun!sun4nl!sun2.iend.wau.nl!HKlompmaker.ZOD.WAU.NL!Hendrik.Klompmaker
  3. From: Hendrik.Klompmaker@beheer.zod.wau.nl (Hendrik Klompmaker)
  4. Subject: File locking question
  5. Message-ID: <Hendrik.Klompmaker.31.726184187@beheer.zod.wau.nl>
  6. Lines: 28
  7. Sender: news@sun2.iend.wau.nl (Newsmanager WAU)
  8. Organization: Wageningen Agricultural University
  9. Date: Mon, 4 Jan 1993 21:49:47 GMT
  10.  
  11. Hy,
  12.  
  13. This might not be the correct folder to put this question but I thought 
  14. there might be a TP solution.
  15. I have to keep a log file a everyone who logs in to my network. A bacth file 
  16. is used to write to that log file by simple redirection:
  17. username >>logfile.dat
  18. which writes the username, time and date to the log file.
  19. A problem arrises when 2 people log in at the same time. Right: the log file 
  20. is locked by one of them and the other one gets a A-R-I error (abort,re...)
  21. Is there a simple (and fast and small) method to detect if a file is locked 
  22. or not. (since username is a TP program it would sure be possible to do the 
  23. checking there (how ??) but maybe it would even be possible to do that at 
  24. dos/batch level. 
  25. Any hints ??
  26.  
  27. Bye
  28.  
  29. Hendrik
  30.  
  31. ===============================================================================
  32. |******** Wageningen Agricultural University. Animal Production Group ********|
  33. -------------------------------------------------------------------------------
  34. Hendrik Klompmaker        Internet : Hendrik.Klompmaker@Beheer.Zod.Wau.Nl
  35. System Manager            Bitnet     : KLOMPMAKER@HWALHW50.BITNET
  36. Phone : +31 (0)8370-83934    Fax     : +31 (0)8370-83962
  37. Snail : Marijkeweg 40, 6709 PG    WAGENINGEN, The Netherlands
  38. ===============================================================================
  39.