1 .\" $Id: curl_easy_init.3,v 1.9 2006/01/15 23:55:53 bagder Exp $
3 .TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
5 curl_easy_init - Start a libcurl easy session
7 .B #include <curl/curl.h>
9 .BI "CURL *curl_easy_init( );"
12 This function must be the first function to call, and it returns a CURL easy
13 handle that you must use as input to other easy-functions. curl_easy_init
14 initializes curl and this call \fBMUST\fP have a corresponding call to
15 \fIcurl_easy_cleanup(3)\fP when the operation is complete.
17 If you did not already call \fIcurl_global_init(3)\fP,
18 \fIcurl_easy_init(3)\fP does it automatically.
19 This may be lethal in multi-threaded cases, since \fIcurl_global_init(3)\fP is
20 not thread-safe, and it may result in resource problems because there is
21 no corresponding cleanup.
23 You are strongly advised to not allow this automatic behaviour, by
24 calling \fIcurl_global_init(3)\fP yourself properly.
25 See the description in \fBlibcurl\fP(3) of global environment
26 requirements for details of how to use this function.
29 If this function returns NULL, something went wrong and you cannot use the
32 .BR curl_easy_cleanup "(3), " curl_global_init "(3), " curl_easy_reset "(3)"