home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / dos / io / lock.txh < prev    next >
Encoding:
Text File  |  1995-07-23  |  734 b   |  26 lines

  1. @node lock, io
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <io.h>
  6.  
  7. int lock(int fd, long offset, long length);
  8. @end example
  9.  
  10. @subheading Description
  11. Locks a region in file @var{fd} using MS-DOS file sharing interface.
  12. The region of @var{length} bytes, starting from @var{offset}, will
  13. become entirely inaccessible to other processes. If multiple locks
  14. are used on a single file they must be non-overlapping. The lock
  15. must be removed before the file is closed.
  16.  
  17. This function will fail unless SHARE, or a network software
  18. providing similar interface, is installed. This function is
  19. compatible with Borland C++ function of the same name.
  20.  
  21. @xref{unlock}.
  22.  
  23. @subheading Return Value
  24. Zero if successful, nonzero if not.
  25.  
  26.