home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / c / 13578 < prev    next >
Encoding:
Text File  |  1992-09-11  |  1.9 KB  |  44 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!usc!sol.ctr.columbia.edu!mary.fordham.edu!sbhatia
  3. From: sbhatia@mary.fordham.edu (SABU)
  4. Subject: file sharing under DOS (share not necessarily loaded)
  5. Organization: Fordham University
  6. Message-ID: <12SEP199200133096@mary.fordham.edu>
  7. News-Software: VAX/VMS VNEWS 1.41    
  8. Sender: nobody@ctr.columbia.edu
  9. Date: Sat, 12 Sep 1992 04:13:00 GMT
  10. X-Posted-From: mary.fordham.edu
  11. X-Posted-Through: sol.ctr.columbia.edu
  12. Lines: 30
  13.  
  14. Hi,
  15.  
  16.    I have to implement a general purpose moule for file locking uder
  17. dos. I cannot safely assume that share is loaded as we do have 
  18. some users who tinker around with their autoexec.bat and thus
  19.  donot load share. 
  20.    I have successfully implemented a sceheme for VAX/VMS (not using the
  21. lock manager) now I would like to do something like this
  22. for dos but there are problems. The basic problem is say that a user
  23. has three windows open and the same program is running, which accesses
  24. the same dataf file. Two processes request reads and they are successful
  25. that's what I want so it is ok. But the third process comes
  26. in and requests a read operation. Initially I thought that it would
  27. be denied the permission to access the file that is open() would
  28. return a -1 but it doesn't it successfully returns a file handle. Is there
  29. some way that I can test the file control block or something to see
  30. that whether at a certain time some other process is accessing the
  31. file for either a read or a write.
  32.  
  33. thanks,
  34.  
  35.  
  36. sabu
  37.  
  38. ////////////////////////////////////////////////////////////////////////
  39. /   Internet:  SBHATIA@mary.fordham.edu                                /
  40. /   BITnet:    SBHATIA@FORDMULC                                        /
  41. /                                                                      /
  42. /                                                                      /
  43. ////////////////////////////////////////////////////////////////////////
  44.