libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] upgrading and life cycle of sockets


From: José Bollo
Subject: Re: [libmicrohttpd] upgrading and life cycle of sockets
Date: Thu, 26 Nov 2020 13:14:18 +0100

On Thu, 26 Nov 2020 12:38:24 +0100
Christian Grothoff <grothoff@gnunet.org> wrote:

> On 11/26/20 8:31 AM, José Bollo wrote:
> > On Tue, 24 Nov 2020 23:12:43 +0100
> > Christian Grothoff <grothoff@gnunet.org> wrote:
> >   
> >> On 11/24/20 4:50 PM, José Bollo wrote:  
> >>> What about if in some future an option to MHD_upgrade_action would
> >>> enable to "extract" the socket? Something like:
> >>>
> >>>   MHD_upgrade_action (urh, MHD_UPGRADE_ACTION_OWN_SOCKET);
> >>>
> >>> with a clear semantic on the implications that it has on
> >>> half-closing.    
> >>
> >> I'm not sure it's needed. What's wrong with dup()?
> >>  
> > 
> > Something is wrong with dup: it needs an other file descriptor,
> > dividing by 2 the count of available connection.  
> 
> For child processes, not really: you can even do the dup()ing only
> after fork() if you manually clear the close-on-exec flag. So you
> don't need any extra FDs if you do it 'just right'.

Yeah but fork+exec is a requirement

> Besides, with epoll() and a proper ulimit setup, you virtually have no
> limit on # connections these days anyway.

for sure unlimited resource on unlimimited earth -_-





reply via email to

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