mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Changes to open-file caching limits and uncached file unserialization.
- Unserializing files that were previously kicked out of the open-file cache would cause them to be fopen'd with the original access permissions which is usually 'w' and causes truncation. They are now opened in 'a' mode. (addresses #780) - Add 'max_files_in_cache' script option to manually set the maximum amount of opened files to keep cached. Mainly this just helped to create a simple test case for the above change. - Remove unused NO_HAVE_SETRLIMIT preprocessor switch. - On systems that don't enforce a limit on number of files opened for the process, raise default max size of open-file cache from 32 to 512.
This commit is contained in:
parent
8766a2e2fc
commit
bbac44a6a4
12 changed files with 104 additions and 11 deletions
|
@ -87,7 +87,13 @@ protected:
|
|||
|
||||
BroFile() { Init(); }
|
||||
void Init();
|
||||
bool Open(FILE* f = 0); // if file is given, it's an open file to use
|
||||
|
||||
/**
|
||||
* If file is given, it's an open file to use already.
|
||||
* If file is not given and mode is, the filename will be opened with that
|
||||
* access mode.
|
||||
*/
|
||||
bool Open(FILE* f = 0, const char* mode = 0);
|
||||
|
||||
BroFile* Prev() { return prev; }
|
||||
BroFile* Next() { return next; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue