Avoid thread-leak in scripts.base.frameworks.file-analysis.bifs.enable-disable btest

This btest uses the exit() BIF to shut down, which immediately calls
::exit() and kills Zeek without doing any shutdown. This will sometimes
leave the thread running the storage manager, which causes TSan to
complain about a thread leak. Switch to use the terminate() BIF instead
which cleanly shuts down all of Zeek.
This commit is contained in:
Tim Wojtulewicz 2025-03-19 16:13:37 -07:00
parent 78267c382c
commit d5ebaf476d

View file

@ -26,5 +26,5 @@ event zeek_init()
event pe_dos_header(f: fa_file, h: PE::DOSHeader)
{
print "got pe_dos_header event";
exit(0);
terminate();
}