You're welcome buddy! :-) On Tue, Jan 23, 2018 at 3:23 PM, Marcel Rutten <mcmrut...@gmail.com> wrote:
> Thanks Christian, > > I checked the error; "Invalid argument". > > > But I've not yet heard about a buggy accept4() implementation... > > This is a first, then :-) : > I blocked accept4() in favour of accept(), and now it works. Don't ask why. > > Anyway, this is the software environment: > kernel 2.6.36, glibc 2.10.1. (as I said already, old stuff). Processor ARM > 926 EJS, arm-linux-gnueabi. > Thanks everyone for your comments. I learned something from all of you. > > @Silvio: Thanks for looking up the code, I'll save it for reference, it > may be very useful in the future. > > > On 22 January 2018 at 23:43, Christian Grothoff <groth...@gnunet.org> > wrote: > >> -1 can be *normal*, as MHD calls 'accept()' (possibly via multiple >> threads when using a thread pool) until there are no more clients. You >> should check what errno says. >> >> Also, in case accept4() is buggy on your platform, it is an >> optimization; so you could #undef HAVE_ACCEPT4 if accept() + >> setsockopt() works better. But I've not yet heard about a buggy >> accept4() implementation... >> >> Happy hacking! >> >> Christian >> >> On 01/22/2018 11:32 PM, Marcel Rutten wrote: >> > Found it. accept4() returns an invalid socket. >> > I will carry on tomorrow, it's almost midnight in my time zone ... >> > -- Silvio Clécio