1PR_Close 2======== 3 4Closes a file descriptor. 5 6 7Syntax 8------ 9 10.. code:: eval 11 12 #include <prio.h> 13 14 PRStatus PR_Close(PRFileDesc *fd); 15 16 17Parameters 18~~~~~~~~~~ 19 20The function has the following parameters: 21 22``fd`` 23 A pointer to a :ref:`PRFileDesc` object. 24 25 26Returns 27~~~~~~~ 28 29One of the following values: 30 31- If file descriptor is closed successfully, ``PR_SUCCESS``. 32- If the file descriptor is not closed successfully, ``PR_FAILURE``. 33 34 35Description 36----------- 37 38The file descriptor may represent a normal file, a socket, or an end 39point of a pipe. On successful return, :ref:`PR_Close` frees the dynamic 40memory and other resources identified by the ``fd`` parameter. 41