mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Installing a handler for running out of memory in "new".
Bro will now print an error message in that case rather than abort with an uncaught exception.
This commit is contained in:
parent
4c3be63919
commit
4da209d3b1
4 changed files with 18 additions and 2 deletions
|
@ -337,6 +337,8 @@ void terminate_bro()
|
|||
delete log_mgr;
|
||||
delete thread_mgr;
|
||||
delete reporter;
|
||||
|
||||
reporter = 0;
|
||||
}
|
||||
|
||||
void termination_signal()
|
||||
|
@ -380,6 +382,8 @@ static void bro_new_handler()
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::set_new_handler(bro_new_handler);
|
||||
|
||||
brofiler.ReadStats();
|
||||
|
||||
bro_argc = argc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue