libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] PATCH: Fix check for epoll mode and blocking socket


From: Evgeny Grin
Subject: Re: [libmicrohttpd] PATCH: Fix check for epoll mode and blocking socket
Date: Wed, 18 May 2022 10:31:37 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0

Hi Kolja,

Your patch is correct, applied as suggested.
Can you share more information about your exotic platform? Do you need other modifications to run successfully MHD or it works just with this patch?
Do you use autotools (configure) or you some custom MHD_config.h?

It's interesting that support for blocking sockets is still needed for some platforms. We may consider drop support for blocking sockets (to simplify the code), but if this support is still important for some platforms we will continue to maintain it.

It is not clear from your message: does your platform not support non-blocking sockets or just fcntl() does not work, while non-blocking sockets can be enabled by some other way?

--
Evgeny

On 17.05.2022 11:07, Kolja Nowak wrote:
Hi,

I'm trying to use libmicrohttpd on a platform where fcntl(fd, O_NONBLOCK) 
doesn't work for sockets. This shouldn't be a problem, as far as I understand, 
except in epoll mode, which I'm not using, because epoll() isn't available 
either.

However, there is a check in daemon.c:internal_add_connection(), the purpose of 
which seems to be to prevent using a blocking socket in epoll mode. At least 
that's what the debug message says. The code however does the opposite, it 
prevents the use of a blocking socket if epoll mode is *not* used. This was 
probably never noticed because platforms without non-blocking sockets are rare.

Please consider applying the following simple fix:

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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