Sun Java System Web Server 6.1 SP11 NSAPI Programmer's Guide

system_flock

The system_flock function locks the specified file against interference from other processes. Use system_flock if you do not want other processes to use the file you currently have open. Overusing file locking can cause performance degradation and possibly lead to deadlocks.

Syntax

int system_flock(SYS_FILE fd);

Returns

The constant IO_OKAY if the lock succeeded, or the constant IO_ERROR if the lock failed.

Parameters

SYS_FILE fd is the platform-independent file descriptor.

See Also

system_errmsg, system_fopenRO, system_fopenRW, system_fopenWA, system_lseek, system_fread, system_fwrite, system_fwrite_atomic, system_ulock, system_fclose