Re: interruptible curl_easy_perform()
Date: 24 Feb 2007 03:51:43 +0000
OK, I get it.
That means that it's pretty hard to use pselect(), because it has the
same problem. Funny that you have to choose between being able to use
any file descriptor you want and having reliable signal processing;
apparently, nobody's made a service that does both.
We could isolate the particular cases where pselect() can be safely
used and use poll() otherwise, but I don't think it's worth the
complexity. I'm going to make a patch that just unblocks signals
shortly before calling poll() or select(), leaving the tiny window for
a missed signal always.
If the need arises to have reliable signal interruptions, we can add
something based on the self-pipe trick (signal handler writes to a
pipe; poll() includes that pipe in its wait-for-input set). They both
have their uses.
>So, when N above approaches FS_SETSIZE, libcurl starts overwriting the fd_set
You mean it overruns the fd_set array, right? At least that's what
GNU libc appears to do -- if you try to set the bit for fd 1200 and
the fd_set is only 1024 bits long, you write over some arbitrary
-- Bryan Henderson San Jose, CaliforniaReceived on 2007-02-24