clarified that curl_global_init() isn't thread-safe and that it might affect
[platform/upstream/curl.git] / docs / libcurl / curl_easy_init.3
1 .\" $Id$
2 .\"
3 .TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
4 .SH NAME
5 curl_easy_init - Start a libcurl easy session
6 .SH SYNOPSIS
7 .B #include <curl/curl.h>
8
9 .BI "CURL *curl_easy_init( );"
10
11 .SH DESCRIPTION
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.
16
17 If you did not already call \fIcurl_global_init(3)\fP, it will be done
18 automatically with a default setup when you call \fIcurl_easy_init(3)\fP.
19 This may be lethal in multi-threaded cases, since \fIcurl_global_init(3)\fP is
20 not thread-safe and must not be called more than once (or from more than one
21 thread). You are strongly adviced to not rely on this automatic behaviour, but
22 call \fIcurl_global_init(3)\fP yourself properly.
23 .SH RETURN VALUE
24 If this function returns NULL, something went wrong and you cannot use the
25 other curl functions.
26 .SH "SEE ALSO"
27 .BR curl_easy_cleanup "(3), " curl_global_init "(3), " curl_easy_reset "(3)"