Revert "Update to 7.40.1"
[platform/upstream/curl.git] / docs / libcurl / curl_easy_init.3
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
9 .\" *
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at http://curl.haxx.se/docs/copyright.html.
13 .\" *
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
17 .\" *
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
20 .\" *
21 .\" **************************************************************************
22 .TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
23 .SH NAME
24 curl_easy_init - Start a libcurl easy session
25 .SH SYNOPSIS
26 .B #include <curl/curl.h>
27
28 .BI "CURL *curl_easy_init( );"
29
30 .SH DESCRIPTION
31 This function must be the first function to call, and it returns a CURL easy
32 handle that you must use as input to other easy-functions. curl_easy_init
33 initializes curl and this call \fBMUST\fP have a corresponding call to
34 \fIcurl_easy_cleanup(3)\fP when the operation is complete.
35
36 If you did not already call \fIcurl_global_init(3)\fP,
37 \fIcurl_easy_init(3)\fP does it automatically.
38 This may be lethal in multi-threaded cases, since \fIcurl_global_init(3)\fP is
39 not thread-safe, and it may result in resource problems because there is
40 no corresponding cleanup.
41
42 You are strongly advised to not allow this automatic behaviour, by
43 calling \fIcurl_global_init(3)\fP yourself properly.
44 See the description in \fBlibcurl\fP(3) of global environment
45 requirements for details of how to use this function.
46
47 .SH RETURN VALUE
48 If this function returns NULL, something went wrong and you cannot use the
49 other curl functions.
50 .SH "SEE ALSO"
51 .BR curl_easy_cleanup "(3), " curl_global_init "(3), " curl_easy_reset "(3)"