Bug 1885489 - Part 9: Add SnapshotIterator::readObject(). r=iain
[gecko.git] / docs / nspr / reference / pr_close.rst
blob1bf310c495595a4a59f2d1aad26b74bf86117d9d
1 PR_Close
2 ========
4 Closes a file descriptor.
7 Syntax
8 ------
10 .. code::
12    #include <prio.h>
14    PRStatus PR_Close(PRFileDesc *fd);
17 Parameters
18 ~~~~~~~~~~
20 The function has the following parameters:
22 ``fd``
23    A pointer to a :ref:`PRFileDesc` object.
26 Returns
27 ~~~~~~~
29 One of the following values:
31 -  If file descriptor is closed successfully, ``PR_SUCCESS``.
32 -  If the file descriptor is not closed successfully, ``PR_FAILURE``.
35 Description
36 -----------
38 The file descriptor may represent a normal file, a socket, or an end
39 point of a pipe. On successful return, :ref:`PR_Close` frees the dynamic
40 memory and other resources identified by the ``fd`` parameter.