1
0
Fork 0
firefox/docs/nspr/reference/pr_close.rst
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

40 lines
666 B
ReStructuredText

PR_Close
========
Closes a file descriptor.
Syntax
------
.. code::
#include <prio.h>
PRStatus PR_Close(PRFileDesc *fd);
Parameters
~~~~~~~~~~
The function has the following parameters:
``fd``
A pointer to a :ref:`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, :ref:`PR_Close` frees the dynamic
memory and other resources identified by the ``fd`` parameter.