Re: race condition?

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Neal Becker, Lee McLoughlin, Ian Jackson
CC: exim-users, Neal Becker, Lee McLoughlin, Ian Jackson
題目: Re: race condition?
On Wed, 10 Apr 1996, Lee McLoughlin wrote:

> Serveral unixes hang onto bound sockets after the process that owns them has vanished.
> Solaris 2.4 was particularly bad, Solaris 2.5 seems to have fixed it, but both Solaris
> and Sunos kernels certainly did this. Sometimes delaying for 60 seconds would give
> things time to clear.
>
> I think it might be best to put a loop around the bind to allow it to try a few times,
> with a minutes delay between each try, before giving up.


On Wed, 10 Apr 1996, Ian Jackson wrote:

> Surely when it re-execs itself it should pass the socket file
> descriptor on to the new daemon process, so that it doesn't have to be
> created and bound again ?


On Wed, 10 Apr 1996, Lee McLoughlin wrote:

> Yes ideally it should. However it is fairly fiddly to do. A lot of exec's
> will close off all file descriptors unless you are careful to setup flags.



In the light of those comments, I will adopt Lee's suggestion of trying
several times with a delay. A minute seems a long time for several
retries. I'll use 30 seconds, and will log what's going on.

--
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714