System_Flock; System_Fopenro - Netscape ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE Manual

Nsapi
Table of Contents

Advertisement

Example
SYS_FILE logfd;
system_fclose(logfd);
See also
system_errmsg, system_fopenRO, system_fopenRW, system_fopenWA,
system_lseek, system_fread, system_fwrite, system_fwrite_atomic,
system_flock, system_ulock

system_flock

The
function locks the specified file against interference from other
system_flock
processes. Use
system_flock
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
failed
Parameters
is the platform-independent file descriptor.
SYS_FILE fd
See also
system_errmsg, system_fopenRO, system_fopenRW, system_fopenWA,
system_lseek, system_fread, system_fwrite, system_fwrite_atomic,
system_ulock, system_fclose

system_fopenRO

The
system_fopenRO
and returns a valid file descriptor. Use this function to open files that will not be
modified by your program. In addition, you can use
new file buffer structure using
Syntax
SYS_FILE system_fopenRO(char *path);
Returns
The system-independent file descriptor (
open failed
if you do not want other processes using the file you
if the lock succeeded or the constant
function opens the file identified by
filebuf_open
SYS_FILE
NSAPI Functions (in Alphabetical Order)
IO_ERROR
in read-only mode
path
system_fopenRO
.
) if the open succeeded or
Chapter 5
NSAPI Function Reference
if the lock
to open a
if the
0
179

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise server 6.0

Table of Contents