cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Close callback

From: Ingo Krabbe <ikrabbe.ask_at_web.de>
Date: Sat, 8 Mar 2008 11:34:27 +0100

Am Freitag, 7. März 2008 18:01:37 schrieb Daniel Stenberg:
> On Fri, 7 Mar 2008, Ingo Krabbe wrote:
> > Still my critizism remains:
> >
> > The same socket changes from OUT to IN while the SockInfo is created
> > twice with nearly the same information.
>
> But how can you tell this is wrong? If close a socket, it will most like be
> the same socket we get when we create a new one (libcurl has no file
> descriptor cache). Hence, you cannot determine libcurl's "correctness" by
> simply investigating the socket and what it tells the application.
>
> You can of course use strace (or similar) to see if the file handle de
> facto is the same (ie not closed in betweeen). Have you done this?
>
> Or turned another way: please provide a complete example source code that
> repeats the problem you seem to experience (and please make the code output
> something special when the problem is seen), and we could get a chance to
> investigate it for real in our ends.

Ok, I have the example for you:

In the package there is cweb-*.tag.gz, which you need to produce CWEB files.
I use this literal programming source for several reasons. But you can run
without by removing the "doc" target from "all" and

touch *.h *.cc *.c; make

Be carefull not to "clean" (use "lazy-clean" instead), since this will remove
the *.h *.cc *.c files, unless you have cweb installed, which is used to
produce the source files.

If you want to do the documentation you need to have TeX with pdftex properly
installed.

bye ingo

Received on 2008-03-08