www.delorie.com/djgpp/doc/libc-2.01/libc_447.html   search  
Go to the first, previous, next, last section, table of contents.


lock

Syntax

#include <io.h>

int lock(int fd, long offset, long length);

Description

Locks a region in file fd using MS-DOS file sharing interface. The region of length bytes, starting from offset, will become entirely inaccessible to other processes. If multiple locks are used on a single file they must be non-overlapping. The lock must be removed before the file is closed.

This function will fail unless SHARE, or a network software providing similar interface, is installed. This function is compatible with Borland C++ function of the same name.

See section unlock.

Return Value

Zero if successful, nonzero if not.


Go to the first, previous, next, last section, table of contents.

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997