Re: exim can hold mainlog files open for a long time .....

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Piete Brooks
CC: exim-users
題目: Re: exim can hold mainlog files open for a long time .....
On Fri, 19 Apr 1996, Piete Brooks wrote:

> > then the log would remain open all that time if it had already been opened
> > for a previous address.
>
> yes -- not a problem.
>
> My concern is not having it *open*, my concern is having it *written to* after
> the file has been "mv"ed / processed / deleted.


True. I've been asleep!

> A simple stat() would show that the inode number of the file hasn't changed.


Is stat() more expensive than time()? That is what it seems to come down
to. Either stat() for each log write to see if the file has changed, or
check the time() and close/reopen after a certain period (possibly only
after a stat() to double-check).

Use of stat() would ensure that *no* further writes were done after the
file has been mv-ed (apart from anything that is actually in progress at
the time of the mv).

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