Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

PUT_FILE_CLOSE_(2) OSS System Calls Reference Manual
To use this function in a 64-bit application on systems running H06.24 or later RVUs or J06.13 or
later RVUs, you must perform all of the following tasks:
Include the pthread.h header file in the application.
Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
Compile the application using the -Wlp64 compiler command option.
Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
Considerations
Returning space allocation after closing a file
Closing a disk file causes the space that is used by the resident file control block
to be returned to the system main-memory pool if the disk file is not open con-
currently. A temporary disk file is purged if the file was not open concurrently.
Any space that is allocated to that file is made available for other files. With any
file closure, the space allocated to the access control block (ACB) is returned to
the system.
Closing a nowait file open
If a PUT_FILE_CLOSE_() call is executed for a nowait file that has pending
operations, any incomplete operations are canceled. There is no indication as to
whether the operation completed or not.
Labeled tape processing
If your system has labeled tape processing enabled, all tape actions (as specified
by tape_disposition) wait for completion.
Process close message
A process can receive a process close system message when it is closed by
another process. It can obtain the process handle of the closer by a subsequent
call to the Guardian FILE_GETRECEIVEINFO_ procedure. For detailed infor-
mation about system messages, see the Guardian Procedure Errors and Mes-
sages Manual.
This message is also received if the close is made by the backup process of a
process pair. Therefore, a process can expect two of these messages when being
closed by a process pair.
RETURN VALUES
The PUT_FILE_CLOSE_ () function returns 0 (zero) upon successful completion. Otherwise,
this function returns a nonzero Guardian file-system error number that indicates the outcome of
the operation.
For information about Guardian file-system error numbers, see the Guardian Procedure Errors
and Messages Manual.
ERRORS
None. This function does not set the errno variable.
RELATED INFORMATION
Functions: PUT_CANCEL(2), PUT_CONTROL(2), PUT_FILE_OPEN_(2),
PUT_LOCKFILE(2), PUT_LOCKREC(2), PUT_READLOCKX(2),
PUT_READUPDATELOCKX(2), PUT_READUPDATEX(2), PUT_READX(2),
PUT_SETMODE(2), PUT_UNLOCKFILE(2), PUT_UNLOCKREC(2),
PUT_WRITEREADX(2), PUT_WRITEUPDATEUNLOCKX(2), PUT_WRITEX(2).
5198 Hewlett-Packard Company 527186-023