aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/examples/10-at-a-time.c3
-rw-r--r--docs/examples/fopen.c4
-rw-r--r--docs/examples/multi-app.c4
-rw-r--r--docs/examples/multi-debugcallback.c4
-rw-r--r--docs/examples/multi-double.c4
-rw-r--r--docs/examples/multi-post.c4
-rw-r--r--docs/examples/multi-single.c4
7 files changed, 27 insertions, 0 deletions
diff --git a/docs/examples/10-at-a-time.c b/docs/examples/10-at-a-time.c
index be3b6faee..50392259c 100644
--- a/docs/examples/10-at-a-time.c
+++ b/docs/examples/10-at-a-time.c
@@ -123,6 +123,9 @@ int main(void)
return EXIT_FAILURE;
}
+ /* In a real-world program you OF COURSE check the return that maxfd is
+ bigger than -1 so that the call to select() below makes sense! */
+
if (curl_multi_timeout(cm, &L)) {
fprintf(stderr, "E: curl_multi_timeout\n");
return EXIT_FAILURE;
diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c
index a2e6fc94a..de235bbc4 100644
--- a/docs/examples/fopen.c
+++ b/docs/examples/fopen.c
@@ -153,6 +153,10 @@ fill_buffer(URL_FILE *file,int want,int waittime)
/* get file descriptors from the transfers */
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ /* In a real-world program you OF COURSE check the return code of the
+ function calls, *and* you make sure that maxfd is bigger than -1
+ so that the call to select() below makes sense! */
+
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
switch(rc) {
diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c
index 5383a40ae..6c0ef7e7f 100644
--- a/docs/examples/multi-app.c
+++ b/docs/examples/multi-app.c
@@ -80,6 +80,10 @@ int main(int argc, char **argv)
/* get file descriptors from the transfers */
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ /* In a real-world program you OF COURSE check the return code of the
+ function calls, *and* you make sure that maxfd is bigger than -1 so
+ that the call to select() below makes sense! */
+
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
switch(rc) {
diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c
index 286267219..4c93df4dc 100644
--- a/docs/examples/multi-debugcallback.c
+++ b/docs/examples/multi-debugcallback.c
@@ -153,6 +153,10 @@ int main(int argc, char **argv)
/* get file descriptors from the transfers */
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ /* In a real-world program you OF COURSE check the return code of the
+ function calls, *and* you make sure that maxfd is bigger than -1
+ so that the call to select() below makes sense! */
+
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
switch(rc) {
diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c
index 51b4ed370..0a4cde855 100644
--- a/docs/examples/multi-double.c
+++ b/docs/examples/multi-double.c
@@ -71,6 +71,10 @@ int main(int argc, char **argv)
/* get file descriptors from the transfers */
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ /* In a real-world program you OF COURSE check the return code of the
+ function calls, *and* you make sure that maxfd is bigger than -1 so
+ that the call to select() below makes sense! */
+
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
switch(rc) {
diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c
index b89e2d632..894ace0ed 100644
--- a/docs/examples/multi-post.c
+++ b/docs/examples/multi-post.c
@@ -93,6 +93,10 @@ int main(int argc, char *argv[])
/* get file descriptors from the transfers */
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ /* In a real-world program you OF COURSE check the return code of the
+ function calls, *and* you make sure that maxfd is bigger than -1
+ so that the call to select() below makes sense! */
+
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
switch(rc) {
diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c
index 0ba932f7a..b23f3c9d4 100644
--- a/docs/examples/multi-single.c
+++ b/docs/examples/multi-single.c
@@ -65,6 +65,10 @@ int main(int argc, char **argv)
/* get file descriptors from the transfers */
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+ /* In a real-world program you OF COURSE check the return code of the
+ function calls, *and* you make sure that maxfd is bigger than -1 so
+ that the call to select() below makes sense! */
+
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
switch(rc) {