Increments the open count for a specified file pointer.
#include <sys/types.h> #include <sys/errno.h> int fp_hold (fp) struct file *fp;
fp | Points to a file structure previously obtained by calling the fp_open, fp_getf, or fp_opendev kernel service. |
The fp_hold kernel service increments the use count in the file structure specified by the fp parameter. This results in the associated file remaining opened even when the original open is closed.
If this function is used, and access to the file associated with the pointer specified by the fp parameter is no longer required, the fp_close kernel service should be called to decrement the use count and close the file as required.
The fp_hold kernel service can be called from the process environment only.
0 | Indicates a successful operation. |
EINVAL | Indicates that the fp parameter is not a valid file pointer. |
The fp_hold kernel service is part of Base Operating System (BOS) Runtime.
Logical File System Kernel Services in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.