Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-135
__ns_start_backup (supplementary)
Usage Guidelines
•
This function is called from the primary process to create and initialize the backup
process.
•
To create the backup process, __ns_start_backup:
•
Starts the backup process with a call to the PROCESS_CREATE_ Guardian
procedure.
•
Returns the process handle of the backup process, if the process started
successfully.
•
To initialize the backup process, __ns_start_backup:
•
Sends to the backup process the same startup, ASSIGN, and PARAM messages
received by the primary process.
•
Calls __ns_fget_file_open_state from the primary process to retrieve the file
open state information for the standard input, output, and error files (stdin,
stdout, stderr).
•
Sends the file open state information from the primary process to the backup
process using the $RECEIVE facility. The backup process then performs a
backup open of the standard files using the file open state information received
the primary process. The sync depth of the standard files is 1.
•
Only the standard files have backup opens performed. Other files opened by the
primary process must be explicitly opened in the backup process by calls to
__ns_backup_open.
•
The file states of the standard files in the backup process are not automatically set to
the corresponding file states in the primary process. If operations have been
performed on a standard file before __ns_start_backup has been called, you must
call __ns_fget_file_state and __ns_fset_file_state to retrieve and set the file state for
the standard files.
•
The backup process has the same swap volume and subvolume as the primary
process.
•
Use the backup_hometerm and backup_debug_options parameters to help test and
debug process pairs.
•
If an error occurs during process creation, the return value is a positive value that
corresponds to a PROCESS_CREATE_ error code. If you supplied an error_detail
parameter, it contains the PROCESS_CREATE_ error subcode. Refer to the
Guardian Procedure Calls Reference Manual for details.
•
If an error occurs during process initialization, the return value is -1 and errno is set
to either of the following:
•
A Guardian file system error code, if a file system error occurs.
•
ENONSTOP, for any other error condition.