Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

curl_multi_cleanup (3)

Name

curl_multi_cleanup - close down a multi session

Synopsis

#include <curl/curl.h>

CURLMcode curl_multi_cleanup(CURLM *multi_handle);

Description

curl_multi_cleanup(3)           libcurl Manual           curl_multi_cleanup(3)



NAME
       curl_multi_cleanup - close down a multi session

SYNOPSIS
       #include <curl/curl.h>

       CURLMcode curl_multi_cleanup(CURLM *multi_handle);

DESCRIPTION
       Cleans  up  and  removes a whole multi stack. It does not free or touch
       any individual easy handles in any way - they still need to  be  closed
       individually,  using  the  usual curl_easy_cleanup(3) way. The order of
       cleaning up should be:

       1 - curl_multi_remove_handle(3) before any easy handles are cleaned up

       2 - curl_easy_cleanup(3) can now be called independently since the easy
       handle is no longer connected to the multi handle

       3  -  curl_multi_cleanup(3)  should be called when all easy handles are
       removed

       Passing in a NULL pointer  in  multi_handle  will  make  this  function
       return CURLM_BAD_HANDLE immediately with no other action.

EXAMPLE
        /* when the multi transfer is done ... */

        /* remove all easy handles, then: */
        curl_multi_cleanup(multi_handle);

AVAILABILITY
       Added in 7.9.6

RETURN VALUE
       CURLMcode type, general libcurl multi interface error code. On success,
       CURLM_OK is returned.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | web/curl         |
       +---------------+------------------+
       |Stability      | Uncommitted      |
       +---------------+------------------+

SEE ALSO
       curl_multi_init(3),curl_easy_cleanup(3),curl_easy_init(3)



NOTES
       Source code for open source software components in Oracle  Solaris  can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source      was      downloaded       from        https://curl.se/down-
       load/curl-7.83.1.tar.bz2.

       Further information about this software can be found on the open source
       community website at http://curl.haxx.se/.



libcurl 7.83.1                 November 26, 2021         curl_multi_cleanup(3)