cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Patch: partial fix for bug #948950

From: David Phillips <electrum_at_gmail.com>
Date: Thu, 18 Nov 2004 15:15:23 -0600

On Thu, 18 Nov 2004 20:33:37 +0100 (CET), Daniel Stenberg
<daniel-curl_at_haxx.se> wrote:
> I guess the test case code must figure this out somehow and act accordingly.

You can use getrlimit(2) and setrlimit(2). They are in POSIX, but it
will likely be necessary to add a check to configure for them. I
suppose that the best thing to do is not open any extra file
descriptors if FD_SETSIZE exceeds getrlimit(RLIMIT_NOFILE)->rlim_max
(in which case it would act like test 500). Also, it might be a
little cleaner to use dup(2) instead of opening /dev/null a number of
times.

-- 
David Phillips <david_at_acz.org>
http://david.acz.org/
Received on 2004-11-18

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET