libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] MHD_handle_connection race leads to deadlock in MHD_


From: Mike Crowe
Subject: Re: [libmicrohttpd] MHD_handle_connection race leads to deadlock in MHD_stop_daemon
Date: Thu, 15 Oct 2009 09:35:01 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Wednesday 14 October 2009 15:13:02 Mike Crowe wrote:
>> It would appear that pselect is designed to solve this problem. I
>> might try using it if it is available and fall back to your fix if
>> not. Some care might be required if the code is relying on SIGALRM waking
>> up reads and writes as well as the select.
 
On Thu, Oct 15, 2009 at 09:34:21AM +0200, Christian Grothoff wrote:
> pselect was designed to solve the problem, but pselect is not as portable 
> *and* on some systems (glibc!) the specific implementation of pselect still 
> has 
> the same problem (see select man page).  So I don't think pselect is a 
> worthwile direction to go into.

Despite what the man page says my glibc appears to have a correct
pselect implementation for Linux (in sysdeps/unix/sysv/linux/pselect.c
- probably added in early 2006.) It would appear that support for the
syscall was added in the v2.6.16 kernel[1]. Quite how this correct
support can be distinguished at runtime or compile time though I'm not
sure.

Mike.

[1] http://www.win.tue.nl/~aeb/linux/lk/lk-12.html#ss12.3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]