~ubuntu-branches/ubuntu/edgy/curl/edgy

« back to all changes in this revision

Viewing changes to docs/libcurl/curl_global_init.3

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-06-29 15:04:24 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060629150424-pn00qumt9sml8p4m
Tags: 7.15.4-1ubuntu1
Synchronize to Debian. Only change left: Removal of stunnel and
libdb4.2-dev build dependencies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
.\" You can view this file with:
2
2
.\" nroff -man [file]
3
 
.\" $Id: curl_global_init.3,v 1.3 2004/05/11 11:30:23 bagder Exp $
 
3
.\" $Id: curl_global_init.3,v 1.5 2006/01/15 23:55:53 bagder Exp $
4
4
.\"
5
5
.TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual"
6
6
.SH NAME
11
11
.BI "CURLcode curl_global_init(long " flags ");"
12
12
.ad
13
13
.SH DESCRIPTION
14
 
This function should only be called once (no matter how many threads or
15
 
libcurl sessions that'll be used) by every application that uses libcurl.
16
 
 
17
 
If this function hasn't been invoked when \fIcurl_easy_init(3)\fP is called,
18
 
it will be done automatically by libcurl.
19
 
 
20
 
The flags option is a bit pattern that tells libcurl exact what features to
 
14
This function sets up the program environment that libcurl needs.  Think
 
15
of it as an extension of the library loader.
 
16
 
 
17
This function must be called at least once within a program (a program is
 
18
all the code that shares a memory space) before the program calls any other
 
19
function in libcurl.  The environment it sets up is constant for the life
 
20
of the program and is the same for every program, so multiple calls have
 
21
the same effect as one call.
 
22
 
 
23
The flags option is a bit pattern that tells libcurl exactly what features to
21
24
init, as described below. Set the desired bits by ORing the values together.
22
 
 
23
 
You must however \fBalways\fP use the \fIcurl_global_cleanup(3)\fP function,
24
 
as that cannot be called automatically for you by libcurl.
25
 
 
26
 
Calling this function more than once will cause unpredictable results.
 
25
In normal operation, you must specify CURL_GLOBAL_ALL.  Don't use any other
 
26
value unless you are familiar with and mean to control internal operations
 
27
of libcurl.
 
28
 
 
29
\fBThis function is not thread safe.\fP  You must not call it when any
 
30
other thread in the program (i.e. a thread sharing the same memory) is
 
31
running.  This doesn't just mean no other thread that is using
 
32
libcurl.  Because \fIcurl_global_init()\fP calls functions of other
 
33
libraries that are similarly thread unsafe, it could conflict with any
 
34
other thread that uses these other libraries.
 
35
 
 
36
See the description in \fBlibcurl\fP(3) of global environment
 
37
requirements for details of how to use this function.
27
38
 
28
39
.SH FLAGS
29
40
.TP 5
44
55
.SH "SEE ALSO"
45
56
.BR curl_global_init_mem "(3), "
46
57
.BR curl_global_cleanup "(3), "
 
58
.BR curl_easy_init "(3) "
 
59
.BR libcurl "(3) "