mozilla
Your Search Results

    PR_Close

    « NSPR API Reference « I/O Functions

    Closes a file descriptor.

    Syntax

    #include <prio.h> 
    
    PRStatus PR_Close(PRFileDesc *fd);
    

    Parameters

    The function has the following parameters:

    fd
    A pointer to a PRFileDesc object.

    Returns

    One of the following values:

    • If file descriptor is closed successfully, PR_SUCCESS.
    • If the file descriptor is not closed successfully, PR_FAILURE.

    Description

    The file descriptor may represent a normal file, a socket, or an end point of a pipe. On successful return, PR_Close frees the dynamic memory and other resources identified by the fd parameter.

    Document Tags and Contributors

    Contributors to this page: Rappo
    Last updated by: Rappo,