cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Re: select() returned with errno = 9 (EBADF), msg = Bad file descriptor

From: Stefan Krause <stefan.krause_at_gmx.net>
Date: Fri, 13 Nov 2009 07:14:20 +0100

Jamie Lokier wrote:
> For debugging, you (a) trace all system calls to a file, using
> something like the strace tool, and (b) modify the call to select() so
> that it iterates over each file descriptor in all the fd sets before
> the select() call, and inside the loop calls fcntl(fd, F_GETFL) to
> check if the descriptor is valid. Then you can look at the system
> call trace to find the last place where close() was called on that
> descriptor. If there isn't one, it's definitely a bug in setting up
> select parameters. If there is one, it might point to buggy code
> calling close().
>
> -- Jamie
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
>
Jamie, thanks for these debugging hints. We still have to investigate
whether the problem is reproducable
(with the latest libCurl version, currently we use the old version 7.16.3).

Thanks, Stefan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-13

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET