Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

Guardian Native C Library Calls (n - r) __ns_backup_fopen64(3)
NAME
__ns_backup_fopen64 - Performs a backup open for a le opened in the primary process |
LIBRARY
G-series native nonPIC Guardian processes: $SYSTEM.SYSTEM.CRTLNS
G-series native PIC Guardian processes: $SYSTEM.SYSTEM.CRTLNS2
H-series native Guardian processes: $SYSTEM.ZDLLnnn.CRTLNSE
SYNOPSIS
#include <crtlns.h>
FILE *__ns_backup_fopen64 (
__ns_std_io_le_open_state *le_open_state);
PARAMETERS
file_open_state Points to a variable that stores the le open state information.
DESCRIPTION
The __ns_backup_fopen64( )
function is similar to the __ns_backup_fopen() function except
that, in addition to supporting smaller les, the __ns_backup_fopen64( ) function supports Guar-
dian les larger than approximately 4 gigabytes.
An application can explicitly call this function when you use the #dene
_LARGEFILE64_SOURCE 1 feature test macro or an equivalent compiler command option to
compile the application.
An application call to __ns_backup_fopen( ) is automatically mapped to this function when you
use the #dene _FILE_OFFSET_BITS 64 feature test macro or an equivalent compiler com-
mand option to compile the application.
For active backup process pairs, the __ns_backup_fopen64( ) function performs a backup open
for a le that was opened in the primary process using ANSI-model I/O.
You can call this function within Guardian processes only. When used in a program compiled by
the TNS compiler, only Guardian modules (modules compiled for the Guardian environment) can
call this function.
This function is called from the backup process to perform a backup open of the le. Before cal-
ling this function, the primary process must rst call the __ns_fget_le_open_state() function to
retrieve the le open state information. The primary process can use the $RECEIVE facility or
other methods to send the state information to the backup processor. The primary process must
send the variable containing the le-state information, not the pointer to the variable, to the
backup process.
The backup le open does not perform any fopen64() function access_mode actions that create
or truncate a le. File-creation and truncation actions are not necessary because the initial
fopen64() call in the primary process performed these actions.
The only meaningful operations on le open state information are:
Retrieving with the __ns_fget_le_open_state() function
Starting a backup le open with the __ns_backup_fopen64() function
Copying with an assignment statement or a copy function from the C run-time library
The results of manipulating components of the le open state information are undened.
For complete details on active backup programming in C, see the Guardian Programmers
Guide.
527192-007 Hewlett-Packard Company 59