SCBD_OPEN_FILE(3) | SCBD_OPEN_FILE(3) |
#include <scboard.h>
int scbd_open_file( char *name, char *attr, int *fd );
scbd_open_file()
attempts to open a file which was
originally located on the host where the scoreboard process is
running. Its filename is the value of a record having the name specified
in the name
argument and the attribute specified in the
attr
argument. If there are two or more values in the
record, only the first value is assumed to be the filename.
scbd_open_file()
copies the file onto local
disk (/var/tmp/score) as a cache when this is the first
access to the file, then opens the cache file
and returns its file descriptor in the fd
argument. If the original
file is modified, then the cache file will be copied again. The
necessary information to validate the cache file is encoded in the
cache filename. Since the cache file creation date and time are obtained
using the stat
(2) Unix system call, clocks of the scoreboard
server host and local host must be synchronized.
scbd_open_file()
returns 0 on success or one of the
the following errors:
open
(2) Unix system
call.
scoreboard
(8)
database process
scoreboard
(8),
scorehosts.db
(5)