[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 1
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10 |
Date: |
Mon, 19 Sep 2011 10:44:08 +0200 |
User-agent: |
KMail/1.13.7 (Linux/2.6.39-1-amd64; KDE/4.6.5; x86_64; ; ) |
On Monday, September 19, 2011 10:29:24 AM Frank Meier wrote:
> hi
>
> > Well, that would seem to solve the problem, but would introduce a
> > race. With 'close', another thread might open a file or socket and
> > MHD's might then select/poll/accept on that unrelated socket.
>
> I'm not sure if I understand the race problem correctly. is it if we
> call close on listening socket, and a thread is entering accept() on
> this socket the descriptor is invalid and accept would return EBADF?
EBADF would be returned, except if another thread creates a fresh listen
socket between the 'close' and the 'accept' (which may happen to get the same
number as the socket that was just closed). Hence it is a race (with MHD, we
should not make assumptions about what the rest of the program might be
doing...).
Happy hacking,
Christian
- [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Frank Meier, 2011/09/17
- Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Christian Grothoff, 2011/09/17
- Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Will Bryant, 2011/09/18
- Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Christian Grothoff, 2011/09/18
- Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Will Bryant, 2011/09/19
- Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Christian Grothoff, 2011/09/19
- Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Will Bryant, 2011/09/20
- Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Christian Grothoff, 2011/09/20
- Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Will Bryant, 2011/09/20
- Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Christian Grothoff, 2011/09/21
- Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Frank Meier, 2011/09/22
- Re: [libmicrohttpd] shutdown of listen socket does not work on solaris 10, Peter Ross, 2011/09/19