cURL / Mailing Lists / curl-library / Single Mail


Double close with SSL

From: Kevin Baughman <>
Date: Thu, 15 Oct 2009 07:30:23 -0700 (PDT)

Hi all,

I was seeing an issue where a file descriptor in a heavily threaded application was being closed from under me. I think I traced it back to a double close in curl, and am able to simply reproduce using a single curl command:

If I run this under strace:
strace curl

Notice at the bottom of the trace:
setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0
send(3, "\25\3\1\0\22\303\200\346g \201\364r\315\33\26\1\370*\214\21<%"..., 23, 0) = 23
close(3) = 0
close(3) = -1 EBADF (Bad file descriptor)



List admin:
Received on 2009-10-15