summaryrefslogtreecommitdiff
path: root/docs/examples/fopen.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-10-13 14:01:19 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-10-13 14:01:19 +0000
commitf53347631eb4a5a075589e6fece43aced010a5bb (patch)
tree1cd251ead3f9be7e337d56011ce0569dba1cd02c /docs/examples/fopen.c
parentefe3cb6e1ae672a48746c6000b1aedd2742deac7 (diff)
downloadcurl-f53347631eb4a5a075589e6fece43aced010a5bb.tar.gz
curl-f53347631eb4a5a075589e6fece43aced010a5bb.tar.bz2
curl-f53347631eb4a5a075589e6fece43aced010a5bb.zip
Added comments about checking return code and the maxfd counter
Diffstat (limited to 'docs/examples/fopen.c')
-rw-r--r--docs/examples/fopen.c4
1 files changed, 4 insertions, 0 deletions
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) {