curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: read() call in timer_cb

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Mon, 8 Jun 2020 23:35:54 +0200 (CEST)

On Mon, 8 Jun 2020, James Read via curl-library wrote:

> This is because my web crawler uses this function and the read() call seems
> to be causing problems with my web crawler.
>
> What is the read() call for?

Obviously it reads from the file descriptor created by timerfd_create(). Which
is a Linux timer API.

> It has been suggested to me elsewhere that I could use select instead. Is
> that right?

Instead of epoll you mean? If you intend to use the multi_socket API then
using select is not advisable, as it really is not suitable for event-based
systems.

> What would the behaviour of the program be if the read call was simply
> taken out?

I can't answer that, I really don't know that interface.

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2020-06-08