lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev PATCH [dev21]: source caching


From: Scott Bigham
Subject: Re: lynx-dev PATCH [dev21]: source caching
Date: Sun, 11 Apr 1999 12:46:07 -0400 (EDT)

On Sun, 11 Apr 1999, Leonid Pauzner wrote:

> One (minor) problem: keeping a temporarily files for sources cache
> we need to be sure to clean these files on exit. Currently it implemented
> in HText_free() but atexit(free_all_texts) was recently ignored
> without LY_FIND_LEAKS.

And I had LY_FIND_LEAKS on for testing purposes; no wonder I didn't see
it.  See, I knew I'd miss something.

(examines code) Wait a minute.  The declaration and definition of
free_all_texts() are wrapped in '#ifdef LY_FIND_LEAKS', but the
atexit(free_all_texts) call in HText_new() isn't.  How can that even
compile without LY_FIND_LEAKS #define'd?  Well, at any rate, the quick
fix would seem to be to change those wrappers to
'#if defined(LY_FIND_LEAKS) || defined(SOURCE_CACHE)'.

> Probably these files will be deleted by clean_files() anyway,

No, cleanup_files() only deletes files listed in the ly_temp list.  And
I hesitate to use that mechanism, because then I'd have to go back and
remove those files from ly_temp when they get uncached.

> ha, don't forget to disable the feature in NONINTERACTIVE mode - it
> will not clean temp files currently (if should not create temp files,
> so a nice check that everything OK).

Hmm, that could be done in the 'if (dump_output_immediately)' block in
main(), yes?

> Also we increase disk activity which may be not good for users
> under disk quota or leaving too much junk if lynx crash unconditionally.

Well, the low-disk-quota user could always put SOURCE_CACHE:FALSE in her
lynx.cfg (or we could have it off by default and make the user turn it
on in lynx.cfg; I only had it on by default for testing purposes), or
compile it out if she's building her own.  As for the crash, that will
be the same as with temporary files, yes?

                                                -sbigham


reply via email to

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