[Top][All Lists]

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

Re: [libmicrohttpd] running in main thread

From: Christian Grothoff
Subject: Re: [libmicrohttpd] running in main thread
Date: Mon, 2 Dec 2019 22:03:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 12/2/19 9:55 PM, José Bollo wrote:
> I tried to write something like "while(true) MHD_run();" but strace
> showed its inefficiency.

Oh my. Yes, that'd be bad.

> IMHO it can make sense: "1. setup 2. run" without exit conditon and not
> bound to any stdin, i.e. a normal unix daemon.

Well, that's trivial. Please consider the attached fragment (not tested,
but should be very close to what you need, modulo error handling).

Attachment: loop.c
Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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