mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
Fix documentation for system_env BIF
This commit is contained in:
parent
3b2ac75e91
commit
19e3f2ee56
3 changed files with 9 additions and 8 deletions
|
@ -1 +1 @@
|
|||
|
||||
helloworld
|
||||
|
|
|
@ -7,17 +7,17 @@ event bro_init()
|
|||
local vars: table[string] of string = { ["TESTBRO"] = "helloworld" };
|
||||
|
||||
# make sure the env. variable is not set
|
||||
local myvar = getenv("TESTBRO");
|
||||
local myvar = getenv("BRO_ARG_TESTBRO");
|
||||
if ( |myvar| != 0 )
|
||||
exit(1);
|
||||
|
||||
# check if command runs with the env. variable defined
|
||||
local a = system_env("echo $TESTBRO > testfile", vars);
|
||||
local a = system_env("echo $BRO_ARG_TESTBRO > testfile", vars);
|
||||
if ( a != 0 )
|
||||
exit(1);
|
||||
|
||||
# make sure the env. variable is still not set
|
||||
myvar = getenv("TESTBRO");
|
||||
myvar = getenv("BRO_ARG_TESTBRO");
|
||||
if ( |myvar| != 0 )
|
||||
exit(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue