I'm very impressed with MHD _customizability_ to use external
features/tools/libraries.

Thanks Gregory and Christian for answers! :-)

On Fri, Jun 10, 2016 at 6:27 PM, Christian Grothoff <[email protected]>
wrote:

> On 06/10/2016 09:20 PM, Junker, Gregory wrote:
> > On Fri, 2016-06-10 at 13:37 +0200, Christian Grothoff wrote:
> >> On 06/10/2016 02:04 AM, silvioprog wrote:
> >>>
> >>> Hello,
> >>>
> >>> Please take a look at this question and the first answer:
> >>>
> >>> http://askubuntu.com/questions/399431/how-many-nginx-processes-shou
> >>> ld-there-be
> >>>
> >>> It raise a question: can I use the worker processes approach with
> >>> MHD?
> >>> If I understood, it need to up two or more process, but when I try
> >>> that:
> >>> "Failed to bind to port 8080: Address already in use".
> >> You can have a parent process do the binding and then share the
> >> listen
> >> socket with child processes. Or, you can on most OSes set the binding
> >> policy to allow multiple processes to listen to the same socket.
> >
> > Interesting, I did not know that was an option. What are the rules
> > about which process gets released from a select() or poll in that
> > case?
>
> It's a (benign) race. Statistically speaking, the process that is less
> busy ;-).  MHD exploits the same race when multiple threads are in a
> thread pool racing to accept on the listen selector in-process.
>

-- 
Silvio Clécio

Reply via email to