tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

pr_close.rst (666B)


      1 PR_Close
      2 ========
      3 
      4 Closes a file descriptor.
      5 
      6 
      7 Syntax
      8 ------
      9 
     10 .. code::
     11 
     12   #include <prio.h>
     13 
     14   PRStatus PR_Close(PRFileDesc *fd);
     15 
     16 
     17 Parameters
     18 ~~~~~~~~~~
     19 
     20 The function has the following parameters:
     21 
     22 ``fd``
     23   A pointer to a :ref:`PRFileDesc` object.
     24 
     25 
     26 Returns
     27 ~~~~~~~
     28 
     29 One 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 
     35 Description
     36 -----------
     37 
     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.