monit-dev
[Top][All Lists]
Advanced

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

Re: monit http server exit


From: Jan-Henrik Haukeland
Subject: Re: monit http server exit
Date: Sun, 14 Sep 2003 23:28:18 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, linux)

Martin Pala <address@hidden> writes:

> Martin Pala wrote:
>
>> Hmm, monit http server blocks on accept(), which causes it not to
>> exit until it receives connection. It will be needed to implement
>> some sort of wakeup or timeout to finalize it gracefully without
>> waiting for the connection to stop the server. I'll look on it.
>>
> I looked on it - probably the best way will be to make monit http
> server non-blocking. What do you think?

Absolutely, the previous implementation was really not good. Using
poll like you have done is the right way and the best way to do this,
but poll does not exist on all systems, and I'm uncertain about *BSD
systems if they actually has poll. CAN SOMEONE PLEASE VERIFY!! (If
they do not have poll, using select instead of poll is an option since
I'm pretty sure most systems has select).

Anyway with this change, the server socket could also be non-blocking
and we are starting to approach a not so bad http server after all :)
It's not important to do this now, but for a later release when we
also refactor the ssl/non-ssl code to make it more transparent and
avoid all this if(ssl) .. else .. print stuff.

Great work Martin!

-- 
Jan-Henrik Haukeland




reply via email to

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