mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

To avoid a memory leak in DNS lookups that's hard to work around and does not otherwise effect typical operation when Zeek is allowed to continue to run after zeek_init().
21 lines
340 B
Text
21 lines
340 B
Text
# @TEST-EXEC: btest-bg-run zeek zeek -b %INPUT
|
|
# @TEST-EXEC: btest-bg-wait 10
|
|
# @TEST-EXEC: btest-diff zeek/.stdout
|
|
|
|
redef exit_only_after_terminate=T;
|
|
|
|
global myset = set("yes");
|
|
|
|
event zeek_init()
|
|
{
|
|
when ( "no" in myset )
|
|
{
|
|
print "lookup successful";
|
|
terminate();
|
|
}
|
|
timeout 0.25sec
|
|
{
|
|
print "timeout";
|
|
terminate();
|
|
}
|
|
}
|